Event Sub-Processes and Boundary Events Used Incorrectly
Boundary events are powerful, but their misuse can introduce hidden logic that breaks process behavior. I’ve seen teams deploy processes that fail silently because a boundary event was attached to the wrong task or triggered in an unintended context. The root issue? Confusion between interrupting and non-interrupting behavior, and failing to recognize when a simple exception flow would suffice.
These errors aren’t just cosmetic. A misapplied boundary event can prevent a process from completing, create parallel execution paths, or make error recovery impossible. This chapter cuts through the noise with real-world patterns, clarifying when to use boundary events, when to avoid them, and how to model exceptions properly.
By the end, you’ll be able to distinguish between a timeout, cancellation, and error condition — and model each with precision, clarity, and control.
When Boundary Events Are Misused
Boundary events are attached to a task or activity and trigger when a specific condition occurs. But their power comes with responsibility. They’re often misused when modelers don’t understand their execution context.
One common error: attaching a boundary event to a task that’s meant to be atomic. If a task like “Process Payment” is interrupted by a “Timer” boundary event, the system must re-execute the task or handle the interruption — but this breaks the atomic nature of the action.
Another issue: using a boundary event to model an exception that should be handled via a standard error flow. This creates redundancy and increases complexity without benefit.
Common Pitfalls in Boundary Event Use
- Using a timer boundary event on a task that’s already governed by a time limit — leading to double triggers.
- Applying a cancel event to a task that’s already in a subprocess — causing unintended termination.
- Attaching a error boundary event to a non-throwing task — resulting in no execution path.
- Using multiple boundary events on the same task without clear precedence — creating ambiguity.
These mistakes stem from a lack of understanding about how boundary events interact with the parent activity’s lifecycle. They’re not event listeners — they are part of the execution flow.
Understanding the Two Types: Interrupting vs. Non-Interrupting
Boundary events come in two forms: interrupting and non-interrupting. Confusion here leads directly to behavioral errors.
An interrupting boundary event stops the parent activity from completing. It’s like a “stop now” signal. If a task is interrupted, any ongoing work is discarded, and control shifts to the boundary event’s path.
A non-interrupting boundary event runs in parallel. It doesn’t stop the parent task — it executes alongside it. This is ideal for timeouts or cancellations that don’t prevent the main task from finishing.
Choosing the wrong type can cause processes to hang, fail to complete, or behave unpredictably under load.
When to Use Which Type
| Use Case | Recommended Type | Why |
|---|---|---|
| Timeout after 30 seconds | Non-interrupting | Let the task continue; just add a delay warning. |
| Cancel the process if user aborts | Interrupting | Stop all work immediately. |
| Log error after task fails | Non-interrupting | Allow task to complete, then handle error. |
Using the wrong type leads to unintended side effects. I’ve seen a payment processing flow hang for 30 seconds because a non-interrupting timeout was mistakenly modeled as interrupting.
Event Sub-Processes: The Hidden Trap
Event subprocesses are often misunderstood. They’re not a substitute for boundary events — they’re a way to model global, asynchronous responses.
They should be used when an event can fire from anywhere in the process, not just from a specific activity. For example, a “System Outage” event subprocess should trigger regardless of which task is active.
But the mistake? Applying an event subprocess to a single task when a boundary event would suffice. This overcomplicates the model and introduces unnecessary execution paths.
When an Event Sub-Process Is Actually Wrong
- Using an event subprocess to catch an error that only occurs in one task — better to use a boundary event.
- Modeling a timer on a single task with an event subprocess instead of a boundary event.
- Creating an event subprocess for a cancellation that only applies in a specific path — it should be local to that path.
Event subprocesses are for global responses — things that can happen at any time, from any point, and affect the entire flow. If the event is tied to a specific task or path, a boundary event is the right choice.
Correct Patterns for Error, Time, and Cancellation Handling
Many teams misuse boundary events because they don’t understand the semantic intent behind each type. Here are the correct patterns.
For Timeouts: Non-Interrupting Timer Boundary Events
If a task must complete within a time limit, use a non-interrupting timer boundary event to trigger a timeout path.
This allows the task to continue running while the timeout is monitored. It’s ideal for customer service workflows, where you want to escalate if no response is received within 5 minutes.
Do not use an interrupting timer — unless you truly want to stop the task immediately.
For Cancellations: Interrupting Cancel Boundary Events
Use an interrupting cancel boundary event when a user or system explicitly cancels the process.
This is common in order management or approval flows. The moment a “Cancel” event is triggered, the entire task or subprocess stops, and the cancellation path is taken.
Ensure the cancel boundary event is connected to the correct point in the flow — usually the start of the task or subprocess.
For Errors: Error Boundary Events
Use error boundary events when an error occurs within a task and you want to handle it locally. This is the standard way to model exception handling.
Always include an error code or message in the label (e.g., “Error: Invalid Credit Card”). This makes the behavior explicit and traceable.
Never attach an error boundary event to a task that doesn’t throw an error. It will never trigger — and that breaks the model’s logic.
When to Avoid Boundary Events Altogether
Not every deviation needs a boundary event. Sometimes, a simple exception flow is clearer and more maintainable.
Consider this: if the exception path is triggered only once per process and is part of the main logic, use a standard error flow. Boundary events are for asynchronous, global, or time-based conditions.
Overusing boundary events creates a model that’s hard to follow, harder to debug, and more likely to contain unintended behavior.
Decision Checklist: Use Boundary Event or Exception Flow?
- Is the condition tied to a specific task or path? → Use exception flow.
- Does the event occur at any time, regardless of context? → Use event subprocess.
- Is it a timeout or cancellation? → Use non-interrupting or interrupting boundary event accordingly.
- Is the event a response to external input (e.g., email, message)? → Use event subprocess.
If you’re unsure, ask: “Would this trigger even if the task had already finished?” If yes, it’s a candidate for an event subprocess. If not, re-evaluate your modeling choice.
Frequently Asked Questions
Can I use multiple boundary events on the same task?
Yes — but only if they represent different types of conditions (e.g., a timer and an error). Use non-interrupting for parallel behaviors. Avoid interrupting boundary events unless you’re certain about the execution order.
Why is my process not completing when I use a boundary event?
Most likely, you used an interrupting boundary event on a task that should continue. The process stops when the boundary event triggers, but the parent task never resumes. Use non-interrupting events for timeouts and error handling.
When should I use an event subprocess instead of a boundary event?
Use an event subprocess when the event can occur from any point in the process, such as a system alert, external message, or global cancellation. Use boundary events for task-specific responses.
Can I use a boundary event to model a retry mechanism?
Not directly. Use a loop marker or a multi-instance task for retries. A boundary event can trigger a retry path, but it should not be the primary mechanism. Model retry logic via loop conditions and error handling.
What’s the difference between a boundary event and a start event?
A start event begins a process. A boundary event is attached to an activity and triggers during its execution. They serve entirely different roles — one starts, the other interrupts.
Why use a non-interrupting boundary event instead of an error flow?
Use non-interrupting events when you want to monitor a condition (e.g., timeout) while the task keeps running. Use error flows when the error is part of the task’s natural failure path.