BPMN Conditional Events
In short: A conditional event is a circle with a lined sheet of paper. It fires when a business condition becomes true: the stock falls below 10, the temperature rises above the limit, the request is rejected. The condition is an expression on data, not a moment in time and not a message.
Guide: Branch with Conditional Boundary Events shows how to write the condition and model the event in Flower.
Symbols
| Symbol | Element | Meaning |
|---|---|---|
| Conditional start event | The process starts when the condition becomes true | |
| Intermediate conditional event (catch) | The process waits here until the condition is true | |
| Conditional boundary event, interrupting | While the activity runs, the condition becomes true: the activity ends and the path of the event is taken | |
| Conditional boundary event, non-interrupting | The activity stays open and the path of the event starts in addition. Dashed border |
A conditional event is always a catch event. Nothing in the process throws it: the condition is watched, and when the data changes so that it becomes true, the event fires.
Conditional Event or Gateway?
Both use a condition, but at different times:
| Exclusive gateway | Conditional event | |
|---|---|---|
| Checks the condition | Once, at the moment the token arrives | While it waits, until the condition becomes true |
| Question | Which way now? | Has it happened yet? |
| Example | Amount above 1,000? | Wait until the stock is refilled |
Use a gateway to decide with the data you have. Use a conditional event to wait for a change, or to react to one while a task is running.
In Jira & Flower BPM
The BPMN standard lets a conditional event fire whenever its condition becomes true. Flower checks the condition at defined moments instead, which differ by position: the boundary event at the resolution of its work item, the intermediate and start event on changes of the process instance.
| Element | Status in Flower |
|---|---|
| Conditional boundary event on a task, interrupting and non-interrupting | Executed, checked when the work item is resolved; the condition is a choice of statuses and resolutions or an expression |
| Intermediate conditional event | Executed, checked when the process instance changes; the condition is an expression |
| Conditional start event | Executed, the new process instance waits before its first task |
| Conditional event sub-process | Executed: starts when the condition on the process instance becomes true (checked when the instance runs or changes), interrupting or non-interrupting |
Conditional Events in Flower at a Glance
The same symbol works in two ways in Flower, depending on where it stands:
| Boundary event on a task | Intermediate event, start event | |
|---|---|---|
| Looks at | The work item of the task (cur) and the process instance (pi) | The process instance (pi) |
| Checked | Once, when the work item is resolved | When the token arrives, then on every change of the process instance |
| If true | The path of the event: instead of the normal flow (interrupting) or in addition (non-interrupting) | The process goes on (intermediate) or its first work item is created (start) |
| If false | The normal flow | The process keeps waiting |
| Use it for | The outcome of a task: Rejected, Cancelled | Waiting for something recorded on the process instance: Approved by the customer, Budget released |
Wait for a Condition: Intermediate and Start Event
An intermediate conditional event waits in the flow until its condition on the process instance is true. A conditional start event does the same before the first task: the process instance is created, but its first work item only when the condition is true.
- Flower checks the condition when the token arrives. If it is already true, the process goes on at once.
- Otherwise the process instance waits. It gets the comment Waiting for the condition …, and Flower marks it (property
flower.waitsForCondition). - Every change of the process instance in Jira checks the condition again: a field, a label, a status, made by a person, by Jira Automation, or by the REST API. When it is true, the process continues.
The condition is about the process instance, so it uses pi:
| Event label | Condition |
|---|---|
| Approved by the customer | ${pi.fields.labels.includes('approved')} |
| Budget released | ${pi.fields.customfield_10060 == 'Released'} |
| Contract signed | ${pi.fields.status.name == 'Signed'} |
| Budget entered (instead of a mandatory field) | ${pi.fields.customfield_10050 != null} |
Typical uses: wait for an outside decision that someone records on the process instance, or for a Jira Automation rule that sets a field when something happens elsewhere.
Branch on the Outcome: Boundary Event
In Flower, the work item of the task decides. Flower checks the condition once, when the work item is resolved:
| Condition when the work item is resolved | Interrupting | Non-interrupting |
|---|---|---|
| true | The path of the event instead of the normal flow | The path of the event and the normal flow |
| false | The normal flow | The normal flow |
For the boundary event this differs from the standard, where the event fires as soon as the condition becomes true. A change to the work item while it is still open does not trigger the event. To react during the work, use a timer or an escalation event.
The simplest condition is a choice of statuses and resolutions in the properties panel (group Condition): the event fires when the resolved work item of the task is in one of the checked statuses or has one of the checked resolutions. With a choice in both lists, both must fit. The statuses come from the work type of the task, the resolutions from the Jira site. While something is checked, the expression is ignored. See Choose a Status or Resolution.
Any other condition is the same kind of expression as on a gateway. cur is the resolved work item of the task, pi is the process instance:
| Event label | Condition |
|---|---|
| Rejected | ${cur.fields.resolution.name == 'Rejected'} |
| Cancelled | ${cur.fields.status.name == 'Cancelled'} |
| Big order | ${pi.fields.customfield_10050 > 10000} |
A typical use is a compact approval: the approval task gets an interrupting conditional boundary event Rejected, and its path leads back to the work. No gateway is needed after the task. See Make Approval Steps.
The step-by-step guide is Branch with Conditional Boundary Events.
Further Rules in Flower
- Instead of mandatory fields: a conditional start event such as
${pi.fields.customfield_10050 != null}lets a process instance that was created without its data (by another process, Jira Automation, or the play button) wait until the fields are filled in. Jira does not refuse to create it, and the first task starts only with the data. See Wait for the Fields. - Precedence: when a resolved work item matches an error boundary event, the error wins and the conditional boundary events of the task are not evaluated. See How a Work Item Continues the Process.
- Status or resolution choice only on the boundary event: an intermediate or start conditional event has no activity whose work item could decide, so its condition is always an expression on
pi. - A field the condition cannot find (a typo, a field that the work type does not have) makes the condition false, and the process instance gets an error comment once. An empty field makes it false without a comment. See Expressions.
Conditional, Error, or Escalation?
| Conditional | Error | Escalation | |
|---|---|---|---|
| Trigger in Flower (boundary event) | A checked status or resolution, or an expression, is true when the work item is resolved | The work item is resolved in the selected status | The work item is moved into the selected status |
| When | When the task ends | When the task ends | While the task is open |
| Meaning | Any outcome | The task failed | Someone else has to help |
| Interrupting | Either | Always | Either |
Common Mistakes
- A conditional event where a gateway is enough. If the data is known when the token arrives, use a gateway.
- A condition on time. Use a timer event.
- In Flower: expecting a boundary event to fire while the work item is open. It is checked at resolution. To wait for a change, use an intermediate conditional event in the flow.
- An intermediate conditional event on the work item of a task. It checks the process instance (
pi), and only changes of the process instance check it again. - A conditional event without a condition. The process waits forever; the model validator warns about it.
- A condition without a label. Name the event after the outcome, for example Rejected.
Read More
- Branch with Conditional Boundary Events: the guide for Flower
- Decision Handling in Gateways: how to write conditions
- BPMN Error Events and BPMN Escalation Events
- BPMN Events: all event types and positions
Frequently Asked Questions
What is a conditional event in BPMN?
An event that fires when a business condition becomes true, for example a value that passes a limit. It is drawn as a circle with a lined sheet.
What is the difference between a conditional event and a gateway?
A gateway checks its conditions once, when the token arrives. A conditional event waits until its condition becomes true.
Can a conditional event be a boundary event?
Yes, interrupting or non-interrupting. It reacts to a condition that becomes true while the activity runs.
How do I let a Jira process wait until something happens?
With Flower, model an intermediate conditional event with a condition on the process instance, for example a label or a field. Every change of the process instance checks the condition, and the process continues when it is true.
How do I branch on the result of a Jira work item in BPMN?
With Flower, attach a conditional boundary event to the task and check the resolutions or statuses that should take its path, or write an expression on any field of the work item. Flower checks it when the work item is resolved.