Error Event
An event marked with a lightning bolt that throws or catches an error inside a process.
What an error event does
An error event is a circle with a lightning-bolt marker. It represents an exception — something that went wrong inside a process. Error events come in thrower and catcher variants: a *throwing* error event (solid fill) raises the error, and a *catching* error event (empty fill) handles it somewhere else in the diagram.
The most common placement is a catching error event on the boundary of a sub-process. The sub-process runs normally; if anything inside it throws an error, the token is interrupted, routed out through the boundary event, and continues along a dedicated error-handling path. This is BPMN’s equivalent of try/catch in code — the happy path stays clean, the error path is explicit and visible.
The patterns you will actually draw
- Catch on boundary: sub-process "Process payment" with an error boundary event labelled "Payment declined" → routes to "Notify customer".
- Throw at end: inside a sub-process, an activity reaches an impossible state → error end event. The boundary event on the parent catches it.
- Catch in an event sub-process: a dedicated invisible sub-process that activates only when a matching error fires anywhere in the parent. Use this when multiple activities can throw the same error.
- Re-throw: catch an error, run a compensation step, then throw a higher-level error from the handler. This is how you escalate.
Error events in LucidFlow
When the source document describes failure paths ("if the credit check fails", "if the vendor rejects the PO", "if the system times out"), LucidFlow emits error events rather than flattening the failure into a generic conditional branch. That difference matters for the cost dashboard: error paths are typically much rarer than happy paths, and their per-execution cost blows up when you divide by the low frequency. Modelling errors explicitly lets the heatmap show "this rare path costs us disproportionately" — which is often where the fastest automation wins live.
Frequently asked questions
What is the difference between an error and a plain conditional branch?
An error is exceptional — it is a path the process is not meant to take. A conditional branch is normal — it is one of several expected outcomes. Modelling an error as a conditional branch makes the happy path harder to read, because exception handling is now mixed with regular logic.
Can I catch any error or only named ones?
Both. A boundary event with no specific error code catches any error the host activity throws. A boundary event with a named error code catches only that one. Engines match by code, which makes escalation semantics precise when they are executed.
What happens if an error fires and no boundary event catches it?
The error propagates outward: to the parent process, then its parent, until something catches it. If nothing does, the top-level process instance terminates with an error state.