AND Gateway
The AND split enables multiple parallel process flows that run concurrently by creating a new (sub-)token for every outgoing sequence flow.
The joining AND gateway waits for a token on every incoming sequence flow. It goes on if all tokens have arrived.
<bpmn:parallelGateway id="Gateway_12isvf1"></bpmn:parallelGateway>
<bpmn:sequenceFlow id="Flow_0m8ktb3" sourceRef="Gateway_12isvf1" targetRef="Gateway_0j4md5h" />
<bpmn:sequenceFlow id="Flow_0xnt74i" sourceRef="Gateway_12isvf1" targetRef="Gateway_0j4md5h" />
<bpmn:sequenceFlow id="Flow_1yhh5gm" sourceRef="Gateway_12isvf1" targetRef="Gateway_0j4md5h" />
<bpmn:parallelGateway id="Gateway_0j4md5h"></bpmn:parallelGateway>
XOR and OR Splitting Gateways
The exclusive (XOR) and inclusive (OR) gateways for splitting a process flow are supported.
The conditions are part of the outgoing sequence flows inside a conditionExpression
.
The condition needs to be single-line JavaScript code (see Script Tasks) which evaluates to a boolean. In difference to Script Tasks, it is not necessary to use variable.get()
. All process variables are directly accessable, e.g. cost > 500
.
- It is possible that exactly one outgoing sequence flow has no condition, if the
default
attribute inside the gateway element is pointing to this sequence flow. - The attribute
language
is optional because theexpressionLanguage
attribute in the overall process should already point to JavaScript - The
name
of the sequence flow should give an explanation about the condition in natural language
...
<bpmn:exclusiveGateway id="Gateway_0sa28ep" name="Question?" default="Flow_06wcc11"></bpmn:exclusiveGateway>
{/* OR */}
<bpmn:inclusiveGateway id="Gateway_0sa28ep" name="Question?" default="Flow_06wcc11"></bpmn:inclusiveGateway>
<bpmn:sequenceFlow id="Flow_16ilr5i" name="Path 1" sourceRef="Gateway_0sa28ep" targetRef="Gateway_0yeglea">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">
cost > 500
</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_0vwvh4d" name="Path 2" sourceRef="Gateway_0sa28ep" targetRef="Gateway_0yeglea">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="https://ecma-international.org/ecma-262/8.0/">
cost == 200
</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_06wcc11" name="Default Flow" sourceRef="Gateway_0sa28ep" targetRef="Gateway_0yeglea" />
...
XOR Joining Gateways
In the case of the XOR join, the gateway waits until one token arrives at an incoming sequence flow. Then it fowards the token to the outgoing sequence flow.
<bpmn:sequenceFlow id="Flow_0cndh90" sourceRef="StartEvent_1" targetRef="Gateway_0q0qwtl" />
<bpmn:sequenceFlow id="Flow_0x9fv5m" sourceRef="Event_0z8366y" targetRef="Gateway_0q0qwtl" />
<bpmn:exclusiveGateway id="Gateway_0q0qwtl"></bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1rz8t57" sourceRef="Gateway_0q0qwtl" targetRef="Event_1nmflnr" />
OR Joining Gateway not supported
The inclusive (OR) joining gateway is not yet supported.