Multiple instances are not created


Multiple instances are not created And I don’t know why
I go from the three node to the parallel gateway

 <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1f8lhe3" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.8.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
      <bpmn:process id="suspend" isExecutable="true">
        <bpmn:startEvent id="StartEvent_1">
          <bpmn:outgoing>Flow_0f2amg2</bpmn:outgoing>
        </bpmn:startEvent>
        <bpmn:sequenceFlow id="Flow_0f2amg2" sourceRef="StartEvent_1" targetRef="Activity_0c3swdg" />
        <bpmn:userTask id="Activity_0c3swdg" name="one" camunda:assignee="one">
          <bpmn:incoming>Flow_0f2amg2</bpmn:incoming>
          <bpmn:outgoing>Flow_1hqu290</bpmn:outgoing>
        </bpmn:userTask>
        <bpmn:userTask id="Activity_0b23ifk" name="four" camunda:assignee="four">
          <bpmn:incoming>Flow_01kskvt</bpmn:incoming>
          <bpmn:outgoing>Flow_0da1zkm</bpmn:outgoing>
        </bpmn:userTask>
        <bpmn:sequenceFlow id="Flow_01kskvt" sourceRef="Gateway_1i2w87r" targetRef="Activity_0b23ifk" />
        <bpmn:sequenceFlow id="Flow_1e83wsi" sourceRef="Gateway_1i2w87r" targetRef="Activity_08gqfyc" />
        <bpmn:userTask id="Activity_08gqfyc" name="five" camunda:assignee="five">
          <bpmn:incoming>Flow_1e83wsi</bpmn:incoming>
          <bpmn:outgoing>Flow_07sjs02</bpmn:outgoing>
        </bpmn:userTask>
        <bpmn:parallelGateway id="Gateway_1i2w87r">
          <bpmn:incoming>Flow_0d38mh9</bpmn:incoming>
          <bpmn:incoming>Flow_0cf6w8e</bpmn:incoming>
          <bpmn:outgoing>Flow_01kskvt</bpmn:outgoing>
          <bpmn:outgoing>Flow_1e83wsi</bpmn:outgoing>
        </bpmn:parallelGateway>
        <bpmn:parallelGateway id="Gateway_1t3kih4">
          <bpmn:incoming>Flow_0da1zkm</bpmn:incoming>
          <bpmn:incoming>Flow_07sjs02</bpmn:incoming>
          <bpmn:outgoing>Flow_19v7i0e</bpmn:outgoing>
        </bpmn:parallelGateway>
        <bpmn:sequenceFlow id="Flow_0da1zkm" sourceRef="Activity_0b23ifk" targetRef="Gateway_1t3kih4" />
        <bpmn:sequenceFlow id="Flow_07sjs02" sourceRef="Activity_08gqfyc" targetRef="Gateway_1t3kih4" />
        <bpmn:endEvent id="Event_0occze7">
          <bpmn:incoming>Flow_19v7i0e</bpmn:incoming>
        </bpmn:endEvent>
        <bpmn:sequenceFlow id="Flow_19v7i0e" sourceRef="Gateway_1t3kih4" targetRef="Event_0occze7" />
        <bpmn:sequenceFlow id="Flow_1hqu290" sourceRef="Activity_0c3swdg" targetRef="Activity_0f8mrml" />
        <bpmn:userTask id="Activity_0f8mrml" name="two" camunda:assignee="two">
          <bpmn:incoming>Flow_1hqu290</bpmn:incoming>
          <bpmn:outgoing>Flow_0ou9cil</bpmn:outgoing>
        </bpmn:userTask>
        <bpmn:sequenceFlow id="Flow_0d38mh9" sourceRef="Activity_12fkt9c" targetRef="Gateway_1i2w87r" />
        <bpmn:exclusiveGateway id="Gateway_19ja15e">
          <bpmn:incoming>Flow_0ou9cil</bpmn:incoming>
          <bpmn:outgoing>Flow_0sh7hji</bpmn:outgoing>
          <bpmn:outgoing>Flow_0cf6w8e</bpmn:outgoing>
        </bpmn:exclusiveGateway>
        <bpmn:sequenceFlow id="Flow_0ou9cil" sourceRef="Activity_0f8mrml" targetRef="Gateway_19ja15e" />
        <bpmn:sequenceFlow id="Flow_0sh7hji" name="${days&#60;=3}" sourceRef="Gateway_19ja15e" targetRef="Activity_12fkt9c">
          <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${days&lt;=3}</bpmn:conditionExpression>
        </bpmn:sequenceFlow>
        <bpmn:sequenceFlow id="Flow_0cf6w8e" name="${days&#62;3}" sourceRef="Gateway_19ja15e" targetRef="Gateway_1i2w87r">
          <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${days&gt;3}</bpmn:conditionExpression>
        </bpmn:sequenceFlow>
        <bpmn:userTask id="Activity_12fkt9c" name="three" camunda:assignee="three">
          <bpmn:incoming>Flow_0sh7hji</bpmn:incoming>
          <bpmn:outgoing>Flow_0d38mh9</bpmn:outgoing>
        </bpmn:userTask>
      </bpmn:process>
      <bpmndi:BPMNDiagram id="BPMNDiagram_1">
        <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="suspend">
          <bpmndi:BPMNEdge id="Flow_0cf6w8e_di" bpmnElement="Flow_0cf6w8e">
            <di:waypoint x="515" y="360" />
            <di:waypoint x="725" y="360" />
            <bpmndi:BPMNLabel>
              <dc:Bounds x="611" y="344" width="50" height="14" />
            </bpmndi:BPMNLabel>
          </bpmndi:BPMNEdge>
          <bpmndi:BPMNEdge id="Flow_0sh7hji_di" bpmnElement="Flow_0sh7hji">
            <di:waypoint x="490" y="385" />
            <di:waypoint x="490" y="440" />
            <bpmndi:BPMNLabel>
              <dc:Bounds x="477" y="410" width="56" height="14" />
            </bpmndi:BPMNLabel>
          </bpmndi:BPMNEdge>
          <bpmndi:BPMNEdge id="Flow_0ou9cil_di" bpmnElement="Flow_0ou9cil">
            <di:waypoint x="489" y="160" />
            <di:waypoint x="489" y="248" />
            <di:waypoint x="490" y="248" />
            <di:waypoint x="490" y="335" />
          </bpmndi:BPMNEdge>
          <bpmndi:BPMNEdge id="Flow_0d38mh9_di" bpmnElement="Flow_0d38mh9">
            <di:waypoint x="540" y="480" />
            <di:waypoint x="750" y="480" />
            <di:waypoint x="750" y="385" />
          </bpmndi:BPMNEdge>
          <bpmndi:BPMNEdge id="Flow_1hqu290_di" bpmnElement="Flow_1hqu290">
            <di:waypoint x="370" y="120" />
            <di:waypoint x="439" y="120" />
          </bpmndi:BPMNEdge>
          <bpmndi:BPMNEdge id="Flow_19v7i0e_di" bpmnElement="Flow_19v7i0e">
            <di:waypoint x="1235" y="450" />
            <di:waypoint x="1322" y="450" />
          </bpmndi:BPMNEdge>
          <bpmndi:BPMNEdge id="Flow_07sjs02_di" bpmnElement="Flow_07sjs02">
            <di:waypoint x="1100" y="510" />
            <di:waypoint x="1210" y="510" />
            <di:waypoint x="1210" y="475" />
          </bpmndi:BPMNEdge>
          <bpmndi:BPMNEdge id="Flow_0da1zkm_di" bpmnElement="Flow_0da1zkm">
            <di:waypoint x="1100" y="360" />
            <di:waypoint x="1210" y="360" />
            <di:waypoint x="1210" y="425" />
          </bpmndi:BPMNEdge>
          <bpmndi:BPMNEdge id="Flow_1e83wsi_di" bpmnElement="Flow_1e83wsi">
            <di:waypoint x="770" y="365" />
            <di:waypoint x="1000" y="484" />
            <bpmndi:BPMNLabel>
              <dc:Bounds x="467" y="183" width="56" height="14" />
            </bpmndi:BPMNLabel>
          </bpmndi:BPMNEdge>
          <bpmndi:BPMNEdge id="Flow_01kskvt_di" bpmnElement="Flow_01kskvt">
            <di:waypoint x="775" y="360" />
            <di:waypoint x="1000" y="360" />
            <bpmndi:BPMNLabel>
              <dc:Bounds x="552" y="99" width="36" height="14" />
            </bpmndi:BPMNLabel>
          </bpmndi:BPMNEdge>
          <bpmndi:BPMNEdge id="Flow_0f2amg2_di" bpmnElement="Flow_0f2amg2">
            <di:waypoint x="214" y="120" />
            <di:waypoint x="270" y="120" />
          </bpmndi:BPMNEdge>
          <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
            <dc:Bounds x="178" y="102" width="36" height="36" />
          </bpmndi:BPMNShape>
          <bpmndi:BPMNShape id="Activity_0hr7mkm_di" bpmnElement="Activity_0c3swdg">
            <dc:Bounds x="270" y="80" width="100" height="80" />
          </bpmndi:BPMNShape>
          <bpmndi:BPMNShape id="Activity_1xudmeb_di" bpmnElement="Activity_0b23ifk">
            <dc:Bounds x="1000" y="320" width="100" height="80" />
          </bpmndi:BPMNShape>
          <bpmndi:BPMNShape id="Activity_1ul4blr_di" bpmnElement="Activity_08gqfyc">
            <dc:Bounds x="1000" y="470" width="100" height="80" />
          </bpmndi:BPMNShape>
          <bpmndi:BPMNShape id="Gateway_0e5na74_di" bpmnElement="Gateway_1i2w87r">
            <dc:Bounds x="725" y="335" width="50" height="50" />
          </bpmndi:BPMNShape>
          <bpmndi:BPMNShape id="Gateway_1t3kih4_di" bpmnElement="Gateway_1t3kih4">
            <dc:Bounds x="1185" y="425" width="50" height="50" />
          </bpmndi:BPMNShape>
          <bpmndi:BPMNShape id="Event_0occze7_di" bpmnElement="Event_0occze7">
            <dc:Bounds x="1322" y="432" width="36" height="36" />
          </bpmndi:BPMNShape>
          <bpmndi:BPMNShape id="Activity_0xnwz7w_di" bpmnElement="Activity_0f8mrml">
            <dc:Bounds x="439" y="80" width="100" height="80" />
          </bpmndi:BPMNShape>
          <bpmndi:BPMNShape id="Gateway_19ja15e_di" bpmnElement="Gateway_19ja15e" isMarkerVisible="true">
            <dc:Bounds x="465" y="335" width="50" height="50" />
          </bpmndi:BPMNShape>
          <bpmndi:BPMNShape id="Activity_0jfumjg_di" bpmnElement="Activity_12fkt9c">
            <dc:Bounds x="440" y="440" width="100" height="80" />
          </bpmndi:BPMNShape>
        </bpmndi:BPMNPlane>
      </bpmndi:BPMNDiagram>
    </bpmn:definitions>

@vapourdown Parallel join GW must be used only with Parallel fork GW !!!

In your bpmn, the Parallel Fork GW does 2 jobs:

  1. Joining the sequences from exclusive GW
  2. Forking the sequence flows when token arrives at the Parallel GW

Generally GWs should follow Single Responsibility Principle and also it should be placed at right place :slight_smile:

From your model there are 2 incoming flows to Parallel GW, but only 1 token was arrived due to the conditions sequence flow.

Always only 1 outgoing sequence flow will be activated.

image

But the Parallel GW expects 2 tokens, so when you complete task2 or/and task 3 only 1 execution token will be arrived in Parallel GW and it waits forever for another token.


To solve this issue before the parallel GW, synchronize the sequence flows using exclusive GW like below:


Deploy this bpmn file and verify: pg.bpmn (9.2 KB)


Task “four” execution synchronization at join PGW


Task “five” execution synchronization at join PGW

1 Like

Ok, Thanks !