Event-Based Gateway
Waits for the first of several competing events (messages, signals, timers) and routes to its path. All other subscriptions are cancelled when the first event fires.
<eventBasedGateway id="waitForResponse" />
<sequenceFlow sourceRef="waitForResponse" targetRef="msgCatch" />
<sequenceFlow sourceRef="waitForResponse" targetRef="timerCatch" />
<intermediateCatchEvent id="msgCatch">
<messageEventDefinition messageRef="ResponseMessage" />
</intermediateCatchEvent>
<intermediateCatchEvent id="timerCatch">
<timerEventDefinition><timeDuration>PT10M</timeDuration></timerEventDefinition>
</intermediateCatchEvent>Execution behavior
- The engine forks a token to each outgoing catch event and creates subscriptions for all of them, grouped by a shared
event_gateway_group_id - When the first event fires, the server:
- Marks that subscription as consumed
- Deletes or marks all sibling subscriptions in the same group as consumed
- Cancels any sibling timers
- Execution continues only down the path of the winning event
The XOR enforcement is server-side — the engine itself creates all subscriptions; the server cancels the losers.
Supported target event types
- Message intermediate catch event
- Signal intermediate catch event
- Timer intermediate catch event
Last updated on