Branch on the Outcome of a Task with Conditional Boundary Events
A conditional boundary event is attached to an activity and has a condition. When the condition is true, the process takes the path of the boundary event. Use it for outcomes such as Rejected, Cancelled, or Escalated: the label of the event says what happened, the condition says when.
Reference: BPMN Conditional Events explains the conditional event in the BPMN standard, and how it differs from a gateway.
Available from Flower 3.7.0.
When Flower Evaluates the Condition
Flower evaluates the condition once, when the work item of the activity is resolved. Changes to the work item while it is open do not trigger the event.
| Condition when the work item is resolved | Interrupting event | Non-interrupting event |
|---|---|---|
| true | The process takes the path of the event instead of the normal outgoing flow | The process takes the path of the event and the normal outgoing flow |
| false | The normal outgoing flow | The normal outgoing flow |
The BPMN standard lets a conditional event fire as soon as its condition becomes true. In Flower, the work item of the activity decides: the condition is checked when it is resolved. To react to a change while the work item is open, use a timer boundary event or a Jira Automation rule.
Write the Condition
The condition is an expression, the same as on the outgoing transitions of an XOR gateway (learn how to write expressions). In a boundary event, these variables are available:
| Variable | Contains |
|---|---|
cur | The resolved work item of the activity the event is attached to |
pi | The process instance |
The fields of a work item are under fields, for example cur.fields.status.name.
Examples:
| Event label | Condition |
|---|---|
| Rejected | ${cur.fields.resolution.name == 'Rejected'} |
| Cancelled | ${cur.fields.status.name == 'Cancelled'} |
| Escalated | ${cur.fields.priority.name == 'Highest'} |
| Big order | ${pi.fields.customfield_10050 > 10000} |
Use the status and resolution names of your Jira. A field without a value makes the condition false.
Model the Event in the Editor
- Drag an intermediate event onto the edge of the activity.
- Use the wrench icon to change it into a conditional boundary event, interrupting or non-interrupting.
- Give it a label, for example Rejected.
- In the properties panel, open Condition and enter the condition in Condition Expression.
- Connect the event to the activity that should follow.
Example: Approval
A conditional boundary event is a compact way to model an approval: the approval activity gets an interrupting conditional boundary event Rejected with the condition ${cur.fields.resolution.name == 'Rejected'}. Its path leads back to the work. Every other resolution continues on the normal outgoing flow. You do not need an XOR gateway after the approval activity.
What’s Next?
-
BPMN Conditional Events: The conditional event in the BPMN standard, with all its positions.
-
End a Task with an Error Status: An error boundary event for a work item that is cancelled or rejected.
-
Make Approval Steps: The approval pattern with an XOR gateway or a conditional boundary event.
-
Decision Handling in Gateways: How to write expressions.
-
Set Jira Due Dates with Timer Events: Timer boundary events for reminders and escalations.