Skip to Content
BPMN ElementsEventsBoundary Events

Boundary Events

Boundary events are attached to tasks or subprocesses and trigger when a specific event occurs while that element is active.

Interrupting vs. non-interrupting

ModeXMLBehavior
InterruptingcancelActivity="true" (default)Cancels the attached element’s token and continues down the boundary’s outgoing flow
Non-interruptingcancelActivity="false"Keeps the attached element’s token active and forks a new token down the boundary’s outgoing flow

Timer boundary event

<boundaryEvent id="escalateTimer" attachedToRef="processOrder" cancelActivity="true"> <timerEventDefinition> <timeDuration>PT2H</timeDuration> </timerEventDefinition> </boundaryEvent>

The timer is scheduled when the attached task becomes active. If the task completes before the timer fires, the timer is cancelled.

Message boundary event

<boundaryEvent id="cancelBoundary" attachedToRef="processOrder" cancelActivity="false"> <messageEventDefinition messageRef="OrderCancelled" /> </boundaryEvent>

A subscription is created when the task becomes active and consumed when the message arrives. Non-interrupting: the original task continues alongside the new path.

Error boundary event

<boundaryEvent id="handleError" attachedToRef="callExternalService" cancelActivity="true"> <errorEventDefinition errorRef="ServiceError" /> </boundaryEvent> <error id="ServiceError" errorCode="SERVICE_UNAVAILABLE" />

Triggered when the attached task fails (retries = 0 from a worker) or when a child subprocess throws a matching error.

Error code matching priority:

  1. Specific code match (errorCode equals the thrown code)
  2. Catch-all (no errorCode specified)

Escalation boundary event

Same matching logic as error boundary events but for escalation codes thrown by escalation throw events or escalation end events inside subprocesses.

<boundaryEvent id="handleEscalation" attachedToRef="subprocess" cancelActivity="false"> <escalationEventDefinition escalationRef="NeedsReview" /> </boundaryEvent> <escalation id="NeedsReview" escalationCode="NEEDS_REVIEW" />

Signal boundary event

<boundaryEvent id="signalBoundary" attachedToRef="longRunningTask" cancelActivity="false"> <signalEventDefinition signalRef="PauseSignal" /> </boundaryEvent>

Triggered when a signal broadcast matches the boundary’s signalRef. Useful for monitoring or side-channel notifications while the main task continues running.

Last updated on