BPMN Gateways

BPMN Gateways

Gateways are elements that route tokens in more complex patterns than plain sequence flow.
Docs
Components
BPMN
BPMN Gateways

BPMN Gateways

Gateways are elements that route tokens in more complex patterns than plain sequence flow.

BPMN's exclusive gateway chooses one sequence flow out of many based on data, whereas BPMN's parallel gateway generates new tokens by activating multiple sequence flows in parallel, for example.

Currently supported elements:

Exclusive gateways

An exclusive gateway (or XOR-gateway) allows you to make a decision based on data (i.e. on process instance variables).

process

If an exclusive gateway has multiple outgoing sequence flows, all sequence flows except one must have a conditionExpression to define when the flow is taken. The gateway can have one sequence flow without conditionExpression, which must be defined as the default flow.

When an exclusive gateway is entered, the conditionExpression is evaluated. The process instance takes the first sequence flow where the condition is fulfilled.

If no condition is fulfilled, it takes the default flow of the gateway. If the gateway has no default flow, an incident is created.

An exclusive gateway can also be used to join multiple incoming flows together and improve the readability of the BPMN. A joining gateway has a pass-through semantic and doesn't merge the incoming concurrent flows like a parallel gateway.

Conditions

It is a Jira Smart Value that can access the process instance variables and compare them with literals or other variables. The condition is fulfilled when the expression returns true.

Multiple boolean values or comparisons can be combined as disjunction (and) or conjunction (or).

For example:

#Expression
1pi.fields.summary == 'new Issue'
2cur.fields.status.name == 'Reject'
3cur.fields.priority.name == 'Low'
4cur.fields.assignee.accountId == '557058:fc60faa5-f40d-4344-ae2b-4becd42a7914'
5cur.fields.customfield_10113 >= 5000
6pi.properties.flowerVariables.external.data.value >= 1000
7pi.fields.comment.comments[0].accountId == '557058:fc60faa5-f40d-4344-ae2b-4becd42a7914'

Parallel gateways

A parallel gateway (or AND-gateway) allows you to split the flow into concurrent paths.

process

When a parallel gateway with multiple outgoing sequence flows is entered, all flows are taken. The paths are executed concurrently and independently.

The concurrent paths can be joined using a parallel gateway with multiple incoming sequence flows. The process instance waits at the parallel gateway until each incoming sequence is taken.

ℹ️

The outgoing paths of the parallel gateway are executed concurrently and not parallel in the sense of parallel threads. All records of a process instance are written to the same partition (single stream processor).

Event-based gateways

Inclusive gateways

ℹ️

Currently, Flower only supports the diverging (i.e. splitting, forking) inclusive gateway. It does not yet support the converging (i.e. merging, joining) inclusive gateway. A combination of parallel and exclusive gateways can be used as an alternative way to merge the flows.

The inclusive gateway (or OR-gateway) allows for making multiple decisions based on data (i.e. on process instance variables).

A process model to prepare lunch at lunchtime can use an inclusive gateway to decide which steps to take to prepare the different lunch components, e.g. cook pasta,stir-fry steak, prepare salad, or any combination of these.

If an inclusive gateway has multiple outgoing sequence flows, all sequence flows must have a condition to define when the flow is taken. If the inclusive gateway only has one outgoing sequence flow, then it does not need to have a condition.

Optionally, one of the sequence flows can be marked as the default flow. This sequence flow should not have a condition, because its behavior depends on the other conditions.

When an inclusive gateway is entered, the conditions are evaluated. The process instance takes all sequence flows where the condition is fulfilled.

For example: Courses selected include pasta and salad.

An inclusive gateway has decided to take the steps to cook pasta and prepare salad, but not stir-fry steak.

For example: Courses selected include steak, pasta and salad.

An inclusive gateway has decided to take the steps to cook pasta, stir-fry steak, and prepare salad.

If no condition is fulfilled, it takes the default flow of the gateway. Note that the default flow is not expected to have a condition, and is therefore not evaluated. If no condition is fulfilled and the gateway has no default flow, an incident is created.

For example: No courses selected then the default flow is taken.

An inclusive gateway has decided to take the step to prepare salad as the default because none of the conditions were fulfilled.

Conditions

A conditionExpression defines when a flow is taken. It is a Jira Smart Value that can access the process instance variables and compare them with literals or other variables. The condition is fulfilled when the expression returns true.

Multiple boolean values or comparisons can be combined as disjunction (and) or conjunction (or).

For example:

#Expression
1pi.fields.summary == 'new Issue'
2cur.fields.status.name == 'Reject'
3cur.fields.priority.name == 'Low'
4cur.fields.assignee.accountId == '557058:fc60faa5-f40d-4344-ae2b-4becd42a7914'
5cur.fields.customfield_10113 >= 5000
6pi.properties.flowerVariables.external.data.value >= 1000
7pi.fields.comment.comments[0].accountId == '557058:fc60faa5-f40d-4344-ae2b-4becd42a7914'

Learn more