Send and receive CloudEvents via RabbitMQ using the Valtimo outbox and inbox.
The Cloud Event Plugin integrates Valtimo processes with event-driven architectures. It allows BPMN processes to:
- Publish CloudEvents to RabbitMQ via the Valtimo outbox
- Receive CloudEvents from RabbitMQ via the Valtimo inbox and route them to waiting or new process instances
| Property | Description |
|---|---|
| None | This plugin has no global configuration properties. All configuration is done at the action level via process links. |
Publishes a CloudEvent to RabbitMQ via the Valtimo outbox.
Key: publish-cloud-event
Supported BPMN elements:
- Send Task
- Intermediate Throw Event
Properties:
| Property | Description |
|---|---|
eventType |
The CloudEvent type field |
resultType |
Classification of the event result |
resultId |
Reference ID for the event result |
data |
Event payload. Serialized to JSON automatically. |
Receives a CloudEvent from the Valtimo inbox (RabbitMQ) and continues a waiting process or starts a new one.
Key: receive-cloud-event
Supported BPMN elements:
- Receive Task
- Intermediate Catch Event (Message)
- Message Start Event
Properties:
| Property | Description |
|---|---|
eventType |
Only process events matching this type. If empty, all events are accepted. |
When a CloudEvent is received, the following process variables are set on the target execution:
| Variable | Description |
|---|---|
cloudEventId |
Unique ID of the CloudEvent |
cloudEventType |
The CloudEvent type field |
cloudEventDate |
Timestamp of the event |
cloudEventResultType |
Result type classification |
cloudEventResultId |
Result reference ID |
cloudEventData |
The event payload / result |
- A Send Task or Intermediate Throw Event triggers the
publish-cloud-eventaction. - The plugin wraps the data in a
CloudEventPluginEventand sends it via theOutboxService. - The outbox delivers the event to RabbitMQ.
- An incoming event arrives from RabbitMQ via the Valtimo inbox.
- The listener checks if the event ID has been processed before (deduplication).
- All process links using the
receive-cloud-eventaction are retrieved. - Each process link is checked against the optional
eventTypefilter. - Depending on the BPMN element type:
- Receive Task -- the waiting execution is signaled with
runtimeService.signal(). - Intermediate Catch Event -- a message is correlated to the waiting execution using the BPMN message name.
- Message Start Event -- a new process instance is started. For document processes, a new document is created and the start message of the linked element is correlated to it, so the process starts at that event and not at whichever start event the engine considers the process's initial activity. For system processes, the message is correlated directly.
- Receive Task -- the waiting execution is signaled with
The plugin creates a cloud_event_processed table to track processed event IDs and prevent duplicate handling.
| Column | Description |
|---|---|
event_id |
Primary key. The CloudEvent ID. |
processed_at |
When the event was processed. |
The schema is managed via Liquibase (see config/liquibase/cloud-event-master.xml).