Skip to content

Commit 6f156d5

Browse files
committed
BPMN Gateways Condition updated
1 parent 1322e42 commit 6f156d5

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

content/developer/bpmn/bpmn-gateways.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ It goes on if all tokens have arrived.
2424
The exclusive (XOR) and inclusive (OR) gateways for splitting a process flow are supported.
2525

2626
The conditions are part of the outgoing sequence flows inside a `conditionExpression`.
27-
The condition needs to be single-line JavaScript code (see [Script Tasks](bpmn-script-task) which evaluates to a boolean.
28-
On the engine, the code is taken and a `return` is put in front of it to get the result.
29-
An outgoing sequence flow is only allowed to have _no_ condition, if the `default` attribute inside the gateway element is pointing to this sequence flow.
27+
The condition needs to be single-line JavaScript code (see [Script Tasks](bpmn-script-task)) 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`.
3028

31-
- the attribute `language` is optional because the `expressionLanguage` attribute in the overall process should already point to JavaScript
32-
- the `name` of the sequence flow should give an explanation about the condition in natural language
29+
- 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.
30+
- The attribute `language` is optional because the `expressionLanguage` attribute in the overall process should already point to JavaScript
31+
- The `name` of the sequence flow should give an explanation about the condition in natural language
3332

3433
```
3534
...
@@ -39,13 +38,13 @@ An outgoing sequence flow is only allowed to have _no_ condition, if the `defaul
3938
4039
<bpmn:sequenceFlow id="Flow_16ilr5i" name="Path 1" sourceRef="Gateway_0sa28ep" targetRef="Gateway_0yeglea">
4140
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">
42-
variable.get('cost') > 500
41+
cost > 500
4342
</bpmn:conditionExpression>
4443
</bpmn:sequenceFlow>
4544
4645
<bpmn:sequenceFlow id="Flow_0vwvh4d" name="Path 2" sourceRef="Gateway_0sa28ep" targetRef="Gateway_0yeglea">
4746
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="https://ecma-international.org/ecma-262/8.0/">
48-
variable.get('cost') == 200
47+
cost == 200
4948
</bpmn:conditionExpression>
5049
</bpmn:sequenceFlow>
5150

0 commit comments

Comments
 (0)