- fork: all outgoing sequence flow conditions are evaluated and for the sequence flow conditions that evaluate to ‘true’, the flows are followed in parallel, creating one concurrent execution for each sequence flow.
- join: all concurrent executions arriving at the inclusive gateway wait at the gateway until an execution has arrived for each of the incoming sequence flows that have a process token. This is an important difference to the parallel gateway. So in other words, the inclusive gateway will only wait for the incoming sequence flows that are executed. After the join, the process continues past the joining inclusive gateway.
ASEE Flow-specific behavior
Note that in ASEE Flow’s implementation of the inclusive gateway, the following holds:- If the join waits for a token, but that token takes a different turn in the process so that it can no longer reach the join (e.g. because of a boundary event interrupting the flow), then the join will not trigger.
- The join will trigger when:
- it received a number of tokens greater or equal to the number of incoming sequence flows. The tokens do not necessarily need to reach the gateway through different sequence flows.
- it received a number of tokens smaller than the number of incoming sequence flows and there are no more tokens that can arrive at the gateway.
-
In the following scenario,
Parallel Gateway 1creates three execution tokens, but only two sequence flows join in the inclusive gateway. In this scenario, the inclusive gateway will trigger even with only two tokens since the tokens fromTask 1andTask 2were joined in a single token byParallel Gateway 2. -
In this scenario,
Parallel Gateway 1creates two execution tokens, and three sequence flows join in the inclusive gateway. In this scenario, the inclusive gateway will trigger with three tokens sinceParallel Gateway 2splits the single token fromTask 1into two separate tokens forTask 3andTask 4. -
In the diagram below, the parallel gateway creates two execution tokens. The first
execution token will wait at
User Task 1, and the second will reach theInclusive Gateway. TheInclusive Gatewaywill trigger immediately for the first token, and a second time, for the second token, as both tokens arrive on the same sequence flow. As a result, there will be two instances ofUser Task 2that will need to be completed. -
In the last scenario, the parallel gateway creates two execution tokens. The first
execution token will wait at
User Task 1, and the second will reach theInclusive Gateway 2and wait for the gateway to trigger. However, theInclusive Gateway 2will not trigger a join untilUser Task 1is completed and the second token arrives at the gateway. As a result, theInclusive Gateway 2will trigger only once instead of two times. According to the BPMN 2.0 specification, since both tokens pass the same sequence flow (true), the inclusive gateway should trigger twice. Finally, due to this behavior, only one instance ofUser Task 2will need to be completed instead of the expected two. In cases like this one, it is recommended to use anExclusive Gatewayinstead of theInclusive Gateway 1.
ASEE Flow Extensions
| Attributes | camunda:asyncBefore, camunda:asyncAfter, camunda:exclusive, camunda:jobPriority |
|---|---|
| Extension Elements | camunda:failedJobRetryTimeCycle, camunda:executionListener |
| Constraints | The camunda:exclusive attribute is only evaluated if the attribute camunda:asyncBefore or camunda:asyncAfter is set to true |