# Deadlock in Process Models

**In short:** A deadlock is a control-flow error in a process model. A parallel join waits for a token that never arrives, so the instance stalls and never finishes. Matching split and join gateway types prevents it.

## Explanation

A process model is a diagram of steps and decisions. Each running case is a process instance. Gateways are the diamond shapes that split or join the flow. Many models contain control-flow errors. Deadlock is one of them, and lack of synchronization is another (f1).

**How a deadlock happens.** A parallel (AND) join makes the instance wait until every incoming sequence flow has been taken (f7). If one incoming branch never delivers, the instance waits forever.

The usual trigger is a mismatch. An exclusive (XOR) gateway selects only one outgoing flow (f8). If a parallel join follows it, the other branches never fire. The join keeps waiting, and the work after it never runs.

**The opposite mismatch.** An exclusive join only passes flows through. It does not merge concurrent flows the way a parallel gateway does (f9). Merging a parallel split with an exclusive join therefore causes lack of synchronization, not a deadlock (f5). See the article "Lack of Synchronization".

**Other ways to get stuck.** An exclusive gateway with no matching condition and no default flow creates an incident, and the instance gets stuck. A default flow avoids this (f10). An inclusive (OR) join completes only under defined conditions. Either all incoming flows were taken at least once, or no path from any active node can still deliver one (f11). Misusing it can also block the flow.

**Link to soundness.** Soundness is a quality check for process models. It has three parts: option to complete, proper completion, and no dead activities (f3). Option to complete guarantees that no deadlocks occur (f2). Proper completion means each token ends in a different end event (f4). A dead activity is one that no instance can ever execute (f3). See "Soundness of Process Models".

**Detection.** Soundness comes from Petri nets and workflow nets, which are formal models of token flow. Translating BPMN into Petri nets is not always possible, so a dedicated open-source soundness checker exists (f6).

## Example

An order process starts with an exclusive gateway: "Pay by card" or "Pay by invoice". Both paths lead into a parallel join before "Ship order". Only one path ever runs. The join waits for a token from the other path, which never comes. The order never ships, and the process never reaches its end. The fix is to use an exclusive join where the two paths meet, so it passes on whichever token arrives.

## Trade-offs

Choosing a join type is a trade-off. A parallel join waits for every branch, which is right after a parallel split but blocks after an exclusive split. An exclusive join never blocks, but it does not synchronize concurrent branches. That leads to lack of synchronization (f5, f7, f9).

BPMN diagram: [Deadlock: an exclusive split feeds a parallel join, which waits forever for the second token.](https://arc.fuet.ch/diagrams/concepts/modeling-bpmn/deadlock-in-process-models/diagram-1.bpmn)

## Checks

- Every parallel (AND) join in the process models is preceded by a parallel split, so no branch can fail to deliver a token.
- Every exclusive gateway has a default flow or conditions that cover all cases.
- Process models have been checked for soundness, including option to complete.
- Inclusive (OR) joins are used only where their completion conditions are understood.

## Related

- [Soundness of Process Models](https://arc.fuet.ch/concepts/modeling-bpmn/soundness-of-process-models.md)
- [Lack of Synchronization](https://arc.fuet.ch/concepts/modeling-bpmn/lack-of-synchronization-in-process-models.md)
- [BPMN Gateway Mismatch Antipatterns](https://arc.fuet.ch/concepts/modeling-bpmn/antipatterns-for-process-flows.md)
- [Errors in Process Models](https://arc.fuet.ch/concepts/modeling-bpmn/errors-in-process-models.md)
- [BPMN Gateway](https://arc.fuet.ch/concepts/modeling-bpmn/bpmn-gateway-semantics.md)
- [BPMN 2.0 Model Quality](https://arc.fuet.ch/concepts/modeling-bpmn/bpmn-2-0-model-quality.md)
- [BPMN Modeling Guidelines](https://arc.fuet.ch/concepts/modeling-bpmn/bpmn-modeling-tips.md)
- [Process Model versus Process Instance](https://arc.fuet.ch/concepts/modeling-bpmn/process-model-versus-process-instance.md)

## Sources

- [Instantaneous, Comprehensible, and Fixable Soundness Checking of Realistic BPMN Models](https://arxiv.org/html/2407.03965v1) — arxiv.org, accessed 2026-11-09
- [Parallel gateway | Camunda 8 Docs](https://docs.camunda.io/docs/components/modeler/bpmn/parallel-gateways/) — docs.camunda.io, accessed 2026-11-08
- [Exclusive gateway | Camunda 8 Docs](https://docs.camunda.io/docs/components/modeler/bpmn/exclusive-gateways/) — docs.camunda.io, accessed 2026-11-08
- [Inclusive gateway | Camunda 8 Docs](https://docs.camunda.io/docs/components/modeler/bpmn/inclusive-gateways/) — docs.camunda.io, accessed 2026-11-08
