Chapter 5 · Fundamentals
Traps
This chapter dives into two sneaky BPMN traps that can trip you up during process modeling: the notorious Deadlock and the mischievous Multi-Merge. These troublemakers can throw a wrench into your workflows, causing chaos and inefficiency if left unchecked. But fear not! The following sections will break down these traps, explain why they happen, and arm you with the tools to outsmart them.

Deadlock
A Deadlock occurs in a BPMN process when the workflow is unable to move forward because it’s waiting for events or conditions that will never happen. This typically happens when tokens are stuck in a way that prevents the process from progressing to completion.
Cause
Deadlocks are often caused by incorrect or incomplete gateway configurations. For example:
- Incorrect Gateway Logic: Using mismatched or conflicting logic in gateways, such as an inclusive gateway that activates paths but doesn’t synchronize properly.
- Token Flow Mismanagement: Tokens are sent down multiple paths, but the logic to merge or handle them isn’t properly modeled.
- Missing Synchronization: Processes requiring all tokens to converge before moving forward might fail if one token never arrives.

Example
Consider a Formula 1 pit stop process involving two teams:
- Wheel Team: Responsible for replacing the car's wheels.
- Fuel Team: Responsible for refueling the car.
If the Exclusive Gateway is used at the start and the Parallel Gateway is used to merge the flows, the process may get stuck because the gateways are not synchronized properly.
Key Takeaway
- Technically incorrect
- Process becomes not completable.
- Token gets stuck
Multi-merge
A Multi-Merge occurs when multiple tokens arrive at the same point in a process without proper synchronization, leading to redundant or unexpected execution of subsequent tasks. Unlike a deadlock, the process doesn’t stop, but it behaves unpredictably.
Cause
Multi-Merges are caused by improper handling of token flows in merging scenarios, such as:
- No Synchronization: Tokens from parallel paths converge without using a gateway to control their arrival.
- Improper Use of Gateways: Using an exclusive gateway or no gateway at all where a parallel or inclusive gateway is required.
- Parallelism Mismanagement: Parallel tasks that generate multiple tokens but merge into a single path without controlling the overlap.

Example:
Imagine a book order process for an online store:
- The customer places an order.
- The package and the invoice are created in parallel.
- If the flows are improperly merged, tasks like shipping the item may occur twice, creating inefficiencies.
Key Takeaway:
Multi-merges are technically correct but negatively impact the process model's expressiveness and efficiency.
- Technically correct
- Affects expressiveness of process model.
- Multiple tokens circulate