cancel
Showing results for 
Search instead for 
Did you mean: 

Update diagram from bpmn20.xml file

mikepoole
Champ in-the-making
Champ in-the-making
Are there any plans to amend the plugin so that any changes to the xml file directly are reflected in the activiti diagram?

Some of my managers are concerned that if developers amend code directly in the xml, then the next developer who is looking at the diagram will a) not be seeing the correct representation of the deployment and b) may then overwrite/undo any changes already made in the xml.

How are other people using the plugin approaching this perceived problem?

Many thanks for your time

Mike
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi Mike,

Well, that should already be the case for most of the supported attributes and elements.
So if you change for example the name of task this should be immediately effective when you reopen the diagram.
What can be the case is that not every attribute/element change is already picked up.
But if you let me know what pieces are missing these can be easily added.

Best regards,

mikepoole
Champ in-the-making
Champ in-the-making
Thanks Tijs

Am I correct in assuming that if you create a new element directly in the XML this will not be represented in the diagram?

As a test, I created a new one user task workflow in the activit diagram. Worked fine. Went in and amended the name of the user task in the XML. Diagram updated fine.

Went into the XML and created a second user task and flows and wired them all appropriately. Added the required bpmndi values (guessed randomly on the x and y co-ordinates!) - nothing new displayed in the activiti diagram. My XML is below

Any input would be helpful. Again, I don;t see this as a major problem but need to be armed with all the data I can get to soothe any fears my development managers have.

Many thanks for your time.

Mike

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:smileysurprised:mgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:smileysurprised:mgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="MikeTest" name="MikeTest">
  <documentation>Place documentation for the 'MikeTest' process here.
  </documentation>
  <startEvent id="startevent1" name="Start"></startEvent>
  <userTask id="usertask1"
   name="First user task created in diagram then amended by XML"
   activiti:assignee="fozzie"></userTask>
  <userTask id="usertask2"
   name="Second user task created directly in the XML file"
   activiti:assignee="fozzie"></userTask>
  <endEvent id="endevent1" name="End"></endEvent>
  <sequenceFlow id="flow1" name="" sourceRef="startevent1"
   targetRef="usertask1"></sequenceFlow>
  <sequenceFlow id="flow2" name="" sourceRef="usertask1"
   targetRef="usertask2"></sequenceFlow>
  <sequenceFlow id="flow3" name="" sourceRef="usertask2"
   targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_MikeTest">
  <bpmndi:BPMNPlane bpmnElement="MikeTest" id="BPMNPlane_MikeTest">
   <bpmndi:BPMNShape bpmnElement="startevent1"
    id="BPMNShape_startevent1">
    <omgdc:Bounds height="35" width="35" x="70" y="130"></omgdc:Bounds>
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
    <omgdc:Bounds height="55" width="105" x="190" y="140"></omgdc:Bounds>
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
    <omgdc:Bounds height="55" width="105" x="250" y="250"></omgdc:Bounds>
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
    <omgdc:Bounds height="35" width="35" x="380" y="160"></omgdc:Bounds>
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
    <omgdi:waypoint x="105" y="147"></omgdi:waypoint>
    <omgdi:waypoint x="190" y="167"></omgdi:waypoint>
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
    <omgdi:waypoint x="295" y="167"></omgdi:waypoint>
    <omgdi:waypoint x="380" y="177"></omgdi:waypoint>
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
    <omgdi:waypoint x="400" y="400"></omgdi:waypoint>
    <omgdi:waypoint x="450" y="450"></omgdi:waypoint>
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>