BPMN Sub-Processes
In short: A sub-process is an activity that contains other steps. It lets you show a process at two levels: one box in the overview, and the details inside. BPMN knows the embedded sub-process (the steps are part of the same model) and the call activity (the steps are another model that can be reused).
Guide: Run Sub-Processes shows how to set up a call activity in Flower, step by step.
Symbols
| Symbol | Element | Meaning |
|---|---|---|
| Embedded sub-process | Steps of the same model, drawn inside one box. Collapsed, the box shows a plus sign | |
| Call activity | Calls another process model. It has a thick border | |
| Event sub-process | Starts when an event happens while its parent runs. It has a dotted border | |
| Transaction | Steps that succeed together or are undone together. It has a double border | |
| Box with a tilde (~) | Ad-hoc sub-process | Steps that can be done in any order, several times, or not at all |
Task or Sub-Process?
Use a task for work that you do not want to break down further. Use a sub-process when the work has steps of its own that somebody needs to see.
The choice depends on the reader, not only on the size of the work. As a customer you do not care how your payment is processed. As the shop you do.
Embedded Sub-Process
An embedded sub-process belongs to its parent model. It has its own start and end event, and the parent waits until it has ended. It cannot be used by another model.
It can be drawn expanded (you see the steps) or collapsed (you see one box with a plus sign). Collapsing keeps a large diagram readable.
Call Activity
A call activity starts another process model and waits until it has finished. The called model is a normal model that can also run on its own. Use it to:
- Reuse a process in several models, for example an approval.
- Split a large model into parts that can be read alone.
- Share ownership: each team maintains its own model.
Event Sub-Process
An event sub-process sits inside a process or sub-process but is not connected to its flow. It starts when its start event happens, for example a message or a timer. Interrupting, it cancels its parent. Non-interrupting, it runs next to it. Typical use: a customer can cancel an order at any time.
Transaction
A transaction groups steps that belong together like a booking: either all succeed, or the ones already done are undone with compensation. It is used mostly in technical processes.
Ad-Hoc Sub-Process
In an ad-hoc sub-process the people who do the work decide what to do and in which order. Activities can be done several times or skipped. BPMN allows tasks, gateways, and intermediate events inside it, but no start and end events.
This looks like the opposite of Process Modeling. It is the honest picture of work that depends on experience and creativity, and often a first step on the way to a more defined process.
In Jira & Flower BPM
| Element | Status in Flower | What happens |
|---|---|---|
| Call activity | Executed | Flower creates a work item for the call activity and turns it into a process instance of the called model. The main process continues when this sub-process instance is resolved |
| Embedded sub-process | Executed | Its tasks are work items of the same process instance, as if they were drawn in the main process. Timers inside belong to that instance |
| Event sub-process | Executed with a conditional, timer, error, message, signal or escalation start event | Starts when its event happens while the process runs; interrupting, it closes the open work items of the process. See below |
| Transaction | Runs like an embedded sub-process | Its tasks become work items; cancel and compensation are not supported (the validator warns) |
| Ad-hoc sub-process | Runs like an embedded sub-process | All its tasks become work items at once (the validator warns). For work without a fixed order, Flower has the agile mode, see Agile Business Process Management |
Event Sub-Processes in Flower
Event sub-processes run when their start event is a conditional, timer, error, message, signal or escalation start event, interrupting or non-interrupting:
- Conditional: the event sub-process starts when its condition on the process instance becomes true; Flower checks it whenever the process instance runs or changes, for example withdrawn in the labels: the request can be withdrawn at any time.
- Timer: it starts on its due day, counted from the start of the process (the timer job of that day), for example a reminder after three days.
- Error: it starts when an error end event of the process is reached, or when a work item of the process is resolved in the Jira status of its error.
- Message: it starts when the message of its name arrives while the process runs, for example a comment
@FlowerBPM Order cancelledon the process instance. See BPMN Message Events. - Signal: it starts when the signal of its name comes while the process runs, for example a comment
@FlowerBPM signal Price list changedon any work item. Every running process instance with this event sub-process gets it. See BPMN Signal Events. - Escalation: it starts at an escalation throw or end event of the process, as in BPMN. The Jira status of a work item escalates only the escalation boundary event of its own task, not an event sub-process.
Interrupting, Flower closes the open work items of the process and the event sub-process takes over; the process instance ends after it. Non-interrupting, it runs beside the process, and the process instance ends when both are done. The tasks inside are work items as usual. A process whose own start event has an event definition (timer, conditional, message, signal) can have event sub-processes too, as long as that is its only start event. With further start events, its event sub-processes never start (the validator warns). Event sub-processes with a compensation or multiple start event do not start either.
The work item of a call activity and the sub-process instance are the same Jira work item. You see one work item at this step, and its status tells you whether the sub-process still runs. The called model must be published and mapped to a work type. Setup and limits are described in Sub-Processes.
One limit to know, in Known Issues: a loop back into a call activity is not supported. A timer on a call activity works, but a change of the due date of its work item does not move it.
Sub-Processes in Flower in Detail
The fine print for the guide Sub-Processes.
What Works Where
In everyday language both are called a sub-process, but they work differently in Flower. The Flower docs say call activity (another model, its own process instance) or embedded sub-process (a box in the same model). Where both behave the same, that is said.
| Feature | Embedded sub-process | Call activity (called model) |
|---|---|---|
| Tasks inside become work items | Yes, of the same process instance | Yes, of the sub-process instance |
| Gateways, lanes, parallel branches inside | Yes; the tasks inside take the lane of the sub-process: the lane of the work item (flowerLane) and the space and work type of the lane. If that work type is mapped to a model, such a task starts it as a sub-process. The assignee of the lane is not set on them, see Known Issues | Yes, the lanes of the called model |
| Data in conditions | pi is the process instance, cur the resolved work item | pi is the sub-process instance, par the calling instance |
| Reuse in several models, own version | No, part of the model | Yes, the published version at the time of the call |
| Timers inside | Yes | Yes, the timers of the sub-process instance |
| Timer boundary event on the border | Yes: waits in the process instance (flowerTimer), interrupting closes the open work items inside | Yes: waits in the calling instance, interrupting closes the sub-process instance |
| Error end event inside → error boundary event on the border | Yes | Yes (same error code) |
| Error boundary event through the status of its work item | No (no work item of its own) | Yes, resolve the sub-process instance in the error status |
| Escalation boundary event through the status of its work item | No (no work item of its own) | Yes, move the sub-process instance into the escalation status |
| Escalation throw event inside → escalation boundary event on the border | Yes | No |
| Escalation end event inside → escalation boundary event on the border | Yes | Yes |
| Conditional boundary event | No (no work item of its own) | Yes, checked when the sub-process instance is resolved |
| Terminate end event inside | Ends the embedded sub-process, the process goes on after it | Ends the sub-process instance, the calling process goes on |
| Terminate end event in the main process | Ends everything | Ends everything, also the running sub-process instances |
| Conditional intermediate event inside | Waits for a change of the process instance | Waits for a change of the sub-process instance |
| Loop back into it | Yes, its tasks are reopened | No |
| Loop marker on it | No, it runs once (the validator warns) | No, it runs once (the validator warns) |
| Mandatory fields | Not relevant | The work type must have none, or the called model starts with a conditional start event |
If the Work Type Is Not Mapped
If the space and work type of the call activity are not part of the Jira work type mapping when Flower creates its work item (for example the mapping was never saved, or an entry is gone), no sub-process can start. Flower creates an ordinary task and writes a warning comment at the calling process instance: The call activity ”…” does not start a sub process. The main process waits until you resolve this task. Add the entry on the Jira Work Type Mapping tab, or give the call activity a mapped work type. The validation of the Flower Modeler reports the same problem as an error before you publish. See Error and Warning Comments from Flower.
If a Sub-Process Cannot Be Started
If Flower cannot start the sub-process, for example because the model is not published any more or Jira cannot create the work item, it writes an error comment at the calling process instance. The call activity keeps its work item, and the main process keeps waiting.
Timers
A timer boundary event on a call activity fires on its due day. The due day waits in the calling process instance (flowerTimer), a change of the due date of the work item does not move it. An interrupting timer ends the running sub-process instance and closes its open work items. The called model keeps its own timers.
On an embedded sub-process, a timer boundary event works the same way: it waits in the process instance, and an interrupting one cancels the embedded sub-process and closes the open work items inside it.
Errors and Escalations
- Error end event in the called model: the call activity ends with the error, and the error boundary event of the call activity with the same error code takes over. Without such a boundary event, the calling process goes on normally. The same works inside an embedded sub-process. See BPMN Error Events.
- Error status on the work item: resolving the sub-process instance in the status of an error boundary event of the call activity, for example Cancelled, takes the error path, like on a task.
- Escalation end event in the called model: the escalation boundary event of the call activity takes over (interrupting, only the escalation path goes on; non-interrupting, the path after the call activity and the escalation path both go on). An escalation intermediate throw event in the called model does not reach the call activity, see Known Issues.
- Escalation status on the work item: moving the sub-process instance into the status of an escalation boundary event of the call activity escalates it. Interrupting, the sub-process instance is closed with its open work items. See Escalate a Task with a Jira Status.
Loops
A loop that leads back to a call activity is not supported. Flower does not reopen the sub-process and writes an error comment at the process instance instead. Start the sub-process again with a new process instance, or model the repetition inside the sub-process.
Nested Sub-Processes
A sub-process can call further sub-processes. A model must not call itself, neither directly nor through other models. This would start new process instances without end. The validation of the Flower Modeler reports such a cycle as an error.
Error End Event in a Called Model
When one branch of a called model reaches an error end event, this error decides how the sub-process instance ends, also when another branch of the called model ends later: the error reaches the error boundary event of the call activity.
Common Mistakes
- A sub-process for one step. A box around a single task adds nothing.
- Copying the same steps into several models. Move them into one model and call it.
- A group instead of a sub-process. A group is only a frame. See BPMN Data and Artifacts.
- A model that calls itself. The Flower modeler reports this as an error when you validate.
Read More
- Sub-Processes: set up a call activity step by step
- BPMN Tasks
- BPMN Coverage in Jira
- All BPMN symbols at a glance
Frequently Asked Questions
What is a sub-process in BPMN?
An activity that contains its own steps. In the overview it is one box, inside it is a process of its own.
What is the difference between a sub-process and a call activity?
An embedded sub-process is part of one model and cannot be reused. A call activity calls a separate model that other models can call as well.
What is an ad-hoc sub-process?
A sub-process whose activities have no fixed order. It is marked with a tilde (~).
Can I run a sub-process in Jira?
Yes. With Flower, a call activity starts another process model as a sub-process and waits until it is finished.