Skip to content

Instantly share code, notes, and snippets.

@korthout
Created June 9, 2020 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save korthout/2038aae67d9692d5d7776e17a50d5ea9 to your computer and use it in GitHub Desktop.
Save korthout/2038aae67d9692d5d7776e17a50d5ea9 to your computer and use it in GitHub Desktop.
Example to show bug in multi-instance input/output element defintions referring to same variable name
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0np1c1o" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Zeebe Modeler" exporterVersion="0.9.1">
<bpmn:process id="Process_0ci0xjm" isExecutable="true">
<bpmn:subProcess id="ReadPagesSubProcess" name="Read pages">
<bpmn:incoming>Flow_0jwqkkk</bpmn:incoming>
<bpmn:outgoing>Flow_03laeqb</bpmn:outgoing>
<bpmn:multiInstanceLoopCharacteristics>
<bpmn:extensionElements>
<zeebe:loopCharacteristics inputCollection="=Book.pages" inputElement="page" outputCollection="pages" outputElement="=page" />
</bpmn:extensionElements>
</bpmn:multiInstanceLoopCharacteristics>
<bpmn:startEvent id="Event_0g684kt">
<bpmn:outgoing>Flow_04y1h2e</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:endEvent id="Event_17xlomo">
<bpmn:incoming>Flow_0u5f9vy</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0u5f9vy" sourceRef="ReadPageTask" targetRef="Event_17xlomo" />
<bpmn:sequenceFlow id="Flow_04y1h2e" sourceRef="Event_0g684kt" targetRef="ReadPageTask" />
<bpmn:serviceTask id="ReadPageTask" name="Read page">
<bpmn:extensionElements>
<zeebe:taskDefinition type="read" />
<zeebe:ioMapping>
<zeebe:output source="={PageNumber:page.PageNumber,isRead:true}" target="page" />
</zeebe:ioMapping>
</bpmn:extensionElements>
<bpmn:incoming>Flow_04y1h2e</bpmn:incoming>
<bpmn:outgoing>Flow_0u5f9vy</bpmn:outgoing>
</bpmn:serviceTask>
</bpmn:subProcess>
<bpmn:startEvent id="Event_02l511x">
<bpmn:outgoing>Flow_0jwqkkk</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:endEvent id="Event_0fhpkxy">
<bpmn:incoming>Flow_03laeqb</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0jwqkkk" sourceRef="Event_02l511x" targetRef="ReadPagesSubProcess" />
<bpmn:sequenceFlow id="Flow_03laeqb" sourceRef="ReadPagesSubProcess" targetRef="Event_0fhpkxy" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0ci0xjm">
<bpmndi:BPMNEdge id="Flow_0jwqkkk_di" bpmnElement="Flow_0jwqkkk">
<di:waypoint x="188" y="190" />
<di:waypoint x="250" y="190" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_03laeqb_di" bpmnElement="Flow_03laeqb">
<di:waypoint x="630" y="190" />
<di:waypoint x="702" y="190" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Event_02l511x_di" bpmnElement="Event_02l511x">
<dc:Bounds x="152" y="172" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0fhpkxy_di" bpmnElement="Event_0fhpkxy">
<dc:Bounds x="702" y="172" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0x5orj9_di" bpmnElement="ReadPagesSubProcess" isExpanded="true">
<dc:Bounds x="250" y="85" width="380" height="210" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_04y1h2e_di" bpmnElement="Flow_04y1h2e">
<di:waypoint x="326" y="185" />
<di:waypoint x="380" y="185" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0u5f9vy_di" bpmnElement="Flow_0u5f9vy">
<di:waypoint x="480" y="185" />
<di:waypoint x="522" y="185" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Event_0g684kt_di" bpmnElement="Event_0g684kt">
<dc:Bounds x="290" y="167" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_17xlomo_di" bpmnElement="Event_17xlomo">
<dc:Bounds x="522" y="167" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0kengxq_di" bpmnElement="ReadPageTask">
<dc:Bounds x="380" y="145" width="100" height="80" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment