BPMN element · Activities

Event Subprocess

Definition

An Event Subprocess is a specialized subprocess designed to handle exceptions, parallel events, or ad hoc situations during a workflow. It can be embedded directly within a parent process or even within another subprocess, ensuring flexibility in managing deviations from the primary flow.

Characteristics

  • Triggered by predefined events such as messages, timers, or conditions. These events serve as triggers to either respond to external signals (e.g., a message from another system) or internal process changes (e.g., a timer expiring or a condition being met).
  • Comes in two forms: interrupting, which halts the parent process, and non-interrupting, which runs in parallel to the parent process. The interrupting variant is critical for scenarios where continuing the parent process would result in errors or conflicts, while the non-interrupting type allows flexibility by handling exceptions without affecting the main workflow.
  • Allows dynamic responses to unforeseen or secondary events without requiring major modifications to the main process structure. This adaptability is particularly useful in complex environments where flexibility is key to maintaining smooth operations.
  • Helps in managing complex workflows by isolating exception-handling logic. By embedding these subprocesses directly within the parent process, you can compartmentalize and simplify the management of unexpected scenarios, ensuring the primary flow remains clear and focused.

Example

At FreshBean Roastery, the team follows their usual groove, prepping and shipping out delicious coffee orders each week. But every now and then, a customer has a change of heart and sends in a last-minute cancellation. No stress! An event subprocess is quietly standing by, ready to jump into action the moment that cancellation message arrives. It gracefully handles the refund and lets the customer know.

 Best Practices

Event Subprocesses, Best When:

  • The event can happen at any time during the parent process → think of them as “always listening” in the background
  • You want to model a reaction that starts a structured flow → great for responses with multiple steps, not just a single action
  • The event might happen inside or outside a specific activity → they’re not tied to a single task but scoped to the whole process or subprocess

Attached Boundary Events, Best When:

  • The event is directly related to a specific activity → you’re saying, “If this task runs and something happens to it, react here.”
  • The reaction is simple or local → ideal for short, immediate responses like sending a reminder, logging a retry, etc.
  • You need to interrupt (or not) just that task → choose interrupting to cancel the task, or non-interrupting to let it continue

→ In most cases, attached boundary events are the way to go!