AnsweredAssumed Answered

BpmnAutoLayout with multiple processes not working as intended

Question asked by coloreddrums on May 8, 2014
Hello,

I want to use the BPMN 2.0 AutoLayout-class in activiti-bpmn-layout-5.15.1.jar for my project. There I am trying to generate the DiagramInterchange xml-part for a previously generated BPMN2.0 XML-document without the DiagramInterchange part.
Most xml's contain multiple processes in one xml file, like the following short example:


<definitions […]>
  <process id="A1521E16A-8592-4A0C-AD3A-FF94D8417AA4" name="1" isExecutable="false" isClosed="false" processType="None">
[…]
  </process>
  <process id="AE60DA0CC-AFA3-45E2-B194-79E1778DC8D2" name="1.1" isExecutable="false" isClosed="false" processType="None">
    […]
  </process>
</definitions>


When I apply the algorithm and save the resulting BPMNModel back into an xml-file, the following xml is the result:


<?xml version="1.0" encoding="UTF-8"?>
<definitions […]>
  <process id="A1521E16A-8592-4A0C-AD3A-FF94D8417AA4" name="1" isExecutable="false" isClosed="false" processType="None">
[…]
  </process>
  <process id="AE60DA0CC-AFA3-45E2-B194-79E1778DC8D2" name="1.1" isExecutable="false" isClosed="false" processType="None">
    […]
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_A1521E16A-8592-4A0C-AD3A-FF94D8417AA4">
    <bpmndi:BPMNPlane bpmnElement="A1521E16A-8592-4A0C-AD3A-FF94D8417AA4" id="BPMNPlane_A1521E16A-8592-4A0C-AD3A-FF94D8417AA4">
      […]<!– Here are all elements of both processes –>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>


I expected the result to be one diagram per process. Here all elements exist in a single diagram, wich makes the result not human-readable.  Is this result intended and can anyone give me a hint how to achieve somthing like the following?


<?xml version="1.0" encoding="UTF-8"?>
<definitions [..]>
  <process id="A1521E16A-8592-4A0C-AD3A-FF94D8417AA4" name="1" isExecutable="false" isClosed="false" processType="None">
    […]
  </process>
  <process id="AE60DA0CC-AFA3-45E2-B194-79E1778DC8D2" name="1.1" isExecutable="false" isClosed="false" processType="None">
    […]
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_A1521E16A-8592-4A0C-AD3A-FF94D8417AA4">
    <bpmndi:BPMNPlane bpmnElement="A1521E16A-8592-4A0C-AD3A-FF94D8417AA4" id="BPMNPlane_A1521E16A-8592-4A0C-AD3A-FF94D8417AA4">
      […]<!– Here are all elements of process 1 –>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
  <bpmndi:BPMNDiagram id="BPMNDiagram_AE60DA0CC-AFA3-45E2-B194-79E1778DC8D2">
    <bpmndi:BPMNPlane bpmnElement="AE60DA0CC-AFA3-45E2-B194-79E1778DC8D2" id="BPMNPlane_AE60DA0CC-AFA3-45E2-B194-79E1778DC8D2">
      […]<!– Here are all elements of process 2 –>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

Outcomes