I have the following process with an inclusive gateway that joins two paths:
Given:
The task A is active
The task B is active
When:
The non-interrupting message boundary event of task B is triggered
The task B is completed
The task A is completed
Then:
The process instance activated and completes the inclusive gateway
The process instance reaches the end event
The process instance is still active but without any active BPMN element
Note:
If task A is completed first then the inclusive gateway and task C are activated/completed twice. The process instance completes after reaching the end event, as expected.
Publish a message with the name M1 and the correlation-key "key"
Complete the job B of the task B
Complete the job A of the task A
Verify that the process instance reaches task C and the end event
Verify that the process instance is not completed
Expected behavior
The process instance is completed after reaching the end event.
How often should the inclusive gateway be completed?
From Camunda 7: once. The documentation mentions this behavior as a Camunda-specific behavior (ref).
From the BPMN specification: twice. The sequence flow S2 is taken twice. When the sequence flow S1 is taken, the inclusive gateway completes because all incoming sequence flows are taken. The gateway consumes one token per sequence flow and produces one token for the outgoing sequence flow. There is one token left on the gateway. Since no other token can reach the gateway, the gateway completes, consumes the token, and produces another token for the outgoing sequence flow.
Describe the bug
I have the following process with an inclusive gateway that joins two paths:
Given:
A
is activeB
is activeWhen:
B
is triggeredB
is completedA
is completedThen:
Note:
A
is completed first then the inclusive gateway and taskC
are activated/completed twice. The process instance completes after reaching the end event, as expected.To Reproduce
M1
and the correlation-key"key"
B
of the taskB
A
of the taskA
C
and the end eventExpected behavior
The process instance is completed after reaching the end event.
How often should the inclusive gateway be completed?
S2
is taken twice. When the sequence flowS1
is taken, the inclusive gateway completes because all incoming sequence flows are taken. The gateway consumes one token per sequence flow and produces one token for the outgoing sequence flow. There is one token left on the gateway. Since no other token can reach the gateway, the gateway completes, consumes the token, and produces another token for the outgoing sequence flow.Log/Stacktrace
Environment:
8.6.0-SNAPSHOT