What Is The Difference Between e2e bpmn xml structure and bpmn io xml structure

I design bpmn with bpmn.js and export xml like this structure :

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="sid-38422fae-e03e-43a3-bef4-bd33b32041b2" targetNamespace="http://bpmn.io/bpmn" exporter="http://bpmn.io" exporterVersion="0.10.1">
  <process id="Process_1" isExecutable="false">


    <startEvent id="StartEvent_1" name="hunger noticed">
      <outgoing>SequenceFlow_1</outgoing>
    </startEvent>

    <task id="Task_1" name="choose recipe">
      <incoming>SequenceFlow_1</incoming>
      <outgoing>SequenceFlow_2</outgoing>
    </task>


    <exclusiveGateway id="ExclusiveGateway_1" name="desired dish?" gatewayDirection="Diverging">
      <incoming>SequenceFlow_2</incoming>
    </exclusiveGateway>


    <sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="Task_1" />
    <sequenceFlow id="SequenceFlow_2" sourceRef="Task_1" targetRef="ExclusiveGateway_1" />
  </process>


  <bpmndi:BPMNDiagram id="BpmnDiagram_1">
    <bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process_1">
      
      
      <bpmndi:BPMNShape id="StartEvent_1_gui" bpmnElement="StartEvent_1">
        <omgdc:Bounds x="242" y="187" width="30" height="30" />
        <bpmndi:BPMNLabel>
          <omgdc:Bounds x="212" y="219" width="90" height="22" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      
      
      <bpmndi:BPMNShape id="Task_1_gui" bpmnElement="Task_1">
        <omgdc:Bounds x="340" y="162" width="100" height="80" />
        <bpmndi:BPMNLabel>
          <omgdc:Bounds x="118.85714721679688" y="47" width="82.28570556640625" height="12" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      
      
      <bpmndi:BPMNShape id="ExclusiveGateway_1_gui" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
        <omgdc:Bounds x="508" y="182" width="40" height="40" />
        <bpmndi:BPMNLabel>
          <omgdc:Bounds x="483" y="225" width="90" height="24" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      
      
      <bpmndi:BPMNEdge id="SequenceFlow_1_gui" bpmnElement="SequenceFlow_1">
        <omgdi:waypoint xsi:type="omgdc:Point" x="272" y="202" />
        <omgdi:waypoint xsi:type="omgdc:Point" x="340" y="202" />
        <bpmndi:BPMNLabel>
          <omgdc:Bounds x="225" y="140" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      
      
      <bpmndi:BPMNEdge id="SequenceFlow_2_di" bpmnElement="SequenceFlow_2">
        <omgdi:waypoint xsi:type="omgdc:Point" x="440" y="202" />
        <omgdi:waypoint xsi:type="omgdc:Point" x="508" y="202" />
        <bpmndi:BPMNLabel>
          <omgdc:Bounds x="433" y="192" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      
      
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>



</definitions>

and I want use bpmn execute engine ( node module ), but this engine support xml *.bpmn like this structure (e2e) :

<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:debugger="http://e2e.ch/bpmneditor/debugger">
  <bpmn:extensionElements>
    <debugger:position href="http://localhost:7261/grapheditor/debugger/position"/>
  </bpmn:extensionElements>
  <bpmn:process id="PROCESS_1">
    <bpmn:startEvent name="MyStart" label="MyStart" id="2">
      <mxCell style="shape=mxgraph.bpmn.none_start_event;verticalLabelPosition=bottom;verticalAlign=top;" vertex="1" parent="1">
        <mxGeometry x="91" y="91" width="40" height="40" as="geometry"/>
      </mxCell>
    </bpmn:startEvent>
    <bpmn:task name="MyTask" label="MyTask" id="3">
      <mxCell style="shape=mxgraph.bpmn.task;" vertex="1" parent="1">
        <mxGeometry x="240" y="81" width="140" height="60" as="geometry"/>
      </mxCell>
    </bpmn:task>
    <bpmn:sequenceFlow name="" sourceRef="2" targetRef="3" id="4">
      <mxCell style="endArrow=block;endFill=1;endSize=6;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="2" target="3">
        <mxGeometry x="1" y="1" as="geometry">
          <mxPoint as="sourcePoint"/>
          <mxPoint x="30" y="30" as="targetPoint"/>
        </mxGeometry>
      </mxCell>
    </bpmn:sequenceFlow>
    <bpmn:endEvent name="MyEnd" label="MyEnd" id="5">
      <mxCell style="shape=mxgraph.bpmn.none_end_event;verticalLabelPosition=bottom;verticalAlign=top;" vertex="1" parent="1">
        <mxGeometry x="470" y="91" width="40" height="40" as="geometry"/>
      </mxCell>
    </bpmn:endEvent>
    <bpmn:sequenceFlow name="" sourceRef="3" targetRef="5" id="6">
      <mxCell style="endArrow=block;endFill=1;endSize=6;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="3" target="5">
        <mxGeometry x="1" y="1" as="geometry">
          <mxPoint as="sourcePoint"/>
          <mxPoint x="30" y="30" as="targetPoint"/>
        </mxGeometry>
      </mxCell>
    </bpmn:sequenceFlow>
  </bpmn:process>
</bpmn:definitions>

how to convert bpmn io structure to e2e structure ?

e2ebridge seems to inline graphical information (mx*** elements) rather than using the BPMN 2.0 standards BPMNDI. You’d need to write your own converter to get from the standard to the e2ebridge format.

If you are on JavaScript, checkout bpmn-moddle for reading the BPMN 2.0 XML file and updating it to the proprietary format.

1 Like