Start & End Events
Start Events
Start events define how a process instance is created.
| Type | Trigger | Behavior |
|---|---|---|
| None | Manual API call | POST /api/instances creates an instance immediately |
| Timer | Schedule | Instance created when the timer fires (cron or one-shot) |
| Message | Message received | Instance created when a message matches the start event’s messageRef |
| Signal | Signal broadcast | Instance created when a matching signal is broadcast |
Message start event
When a message is sent (POST /api/messages), the engine checks message start definitions last — after boundary subscriptions, catch events, and event subprocesses. At most one new instance is created per message delivery.
End Events
| Type | Behavior |
|---|---|
| None | Token is consumed; instance completes if no other active tokens remain |
| Error | Throws an error with an optional error code; caught by boundary events or error event subprocesses |
| Terminate | Immediately cancels all remaining tokens and terminates the instance |
| Escalation | Throws an escalation code; caught by escalation boundary events or escalation event subprocesses |
| Message | Records the message in the instance audit trail, then completes |
| Signal | Records the signal in the instance audit trail, then completes |
Error end event
<endEvent id="paymentFailed">
<errorEventDefinition errorRef="PaymentError" />
</endEvent>
<error id="PaymentError" errorCode="PAYMENT_DECLINED" />The engine stores the thrown error code in thrown_error. When the subprocess or process instance fails, the parent looks for:
- A boundary error event with
errorCodematchingthrown_error - A boundary error event with no
errorCode(catch-all) - An error event subprocess with a matching or catch-all trigger
If none are found the failure propagates up.
Terminate end event
<endEvent id="abort">
<terminateEventDefinition />
</endEvent>All active tokens across all parallel branches are cancelled immediately. Use this to hard-stop a process when a critical condition is met.
Last updated on