> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Message Events

> Message events serve as a means to incorporate messaging capabilities into business process modeling. These events are specifically designed to capture the interaction between different process participants by referencing messages.

Message events let processes communicate with each other: a process throws a message and another process, or another part of the same process, catches it, either advancing a waiting flow or starting a new instance.

![Process canvas with six numbered message event examples: Start Message Catch Event, Intermediate Message Throw Event, Intermediate Message Catch Event, interrupting and non-interrupting catch boundary events on user tasks, and a user task with multiple boundary message events](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/release34/message_events_new.png)

With message events, processes can pause their execution until the expected messages are received, enabling effective coordination and communication between various system components.

## Intermediate events

| Trigger | Description | Marker |
| - | - | :-: |
| Message | A Message Intermediate Event serves to send or receive messages. A filled marker denotes a "throw" event, while an unfilled marker indicates a "catch" event. This either advances the process or alters the flow for exception handling. Identifying the Participant is done by connecting the Event to a Participant through a Message Flow. | Throw ![Message throw event symbol with a filled envelope](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/building-blocks/node/throw_message_event.png#center) Catch ![Message catch event symbol with an outlined envelope](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/building-blocks/node/message_catch_intermediate_event.png#center) |

## Boundary events

Boundary Events involve handling by first consuming the event occurrence. Message Catch Boundary Events, triggered by incoming messages, can be configured as either interrupting or non-interrupting.

| Trigger | Description | Marker |
| - | - | :-: |
| Message | **Non-interrupting Message Catch Event**: The event can be triggered at any time while the associated task is being performed. | Non-interrupting ![Non-interrupting message catch boundary event attached to a task, drawn with a dashed border](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/building-blocks/node/%20message_catch_non_interrupting.png#center) |

| Trigger | Description | Marker |
| - | - | :-: |
| Message | **Interrupting Message Catch Event**: The event can be triggered at any time while the associated task is being performed, interrupting the task. | Interrupting ![Interrupting message catch boundary event attached to a task, drawn with a solid border](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/building-blocks/node/message_catch_interrupting_event.png#center) |

## Intermediate vs boundary

**Intermediate Events**

* Intermediate events temporarily halt the process instance, awaiting a message.

**Boundary Interrupting Events**

* These events can only be triggered while the token is active within the parent node.

![Process instance with a token waiting on User\_Task\_008, whose interrupting message boundary event is highlighted, and the Tokens tab listing that token as ACTIVE with status EXECUTED\_PARTIAL](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/release34/token_interrupting.png)

* Upon activation, the parent node concludes, and the token progresses based on the boundary flow.

![The same process instance after the boundary event fires: the token for User\_Task\_008 is INACTIVE and the flow continues along the boundary path](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/release34/token_intterrupting_exec.png)

**Boundary Non-Interrupting Events**

* Similar to interrupting events, non-interrupting events can only be triggered while the token is active in the parent node.
* Upon triggering, the parent node remains active, and a new token is generated to execute the boundary flow concurrently.

FlowX.AI works with the following message events nodes:

* [**Message catch start event**](https://docs.flowx.ai/6.x/docs/building-blocks/node/message-events/message-catch-start-event.md)
* [**Message intermediate events**](./message-intermediate/)
* [**Message catch boundary event**](https://docs.flowx.ai/6.x/docs/building-blocks/node/message-events/message-catch-boundary-event.md)

## Message events correlation

> [!NOTE]
>
> Catch events are not limited to messages thrown inside FlowX. A Message Start Event or a Message Catch Intermediate Event can also be driven by an external HTTP POST, letting an outside system start a process or resume one that is waiting. See [Incoming Webhooks](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/incoming-webhooks.md) for setup.

Messages are not sent directly to process instances. Instead, message correlation is achieved through two properties that must match between the throw and catch events:

* **Message name** — configured via the "Correlate with catch/throwing events" dropdown, must be identical on both sides
* **Correlation value** — the runtime value extracted from the correlation key expression

> [!NOTE]
>
> A correlation key is an expression that resolves to a value at runtime. The engine extracts this value from the process instance and uses it to match throw and catch events. It is not the key name that matters, but the **value** it resolves to.
>
> For example, if two sibling subprocesses both use `parentProcessInstanceId` as their correlation key, the engine extracts the parent's ID from each — since both share the same parent, the values match and the message is delivered.

### Available correlation keys

The correlation key expression is evaluated against two sources, checked in order:

1. **Instance metadata** — system properties automatically set by the engine:

| Key | Description | Available on |
| - | - | - |
| `processInstanceId` | Numeric ID of the current process instance | All instances |
| `processInstanceUuid` | UUID of the current process instance | All instances |
| `parentProcessInstanceId` | Numeric ID of the parent process | Subprocesses only |
| `parentProcessInstanceUuid` | UUID of the parent process | Subprocesses only |

2. **Process variables** (`paramValues`) — any custom variable stored in the process data model (e.g., `orderId`, `applicationId`, `customer.ssn`)

> [!TIP]
>
> For communication between sibling subprocesses (subprocess → subprocess), use `parentProcessInstanceId` since both siblings share the same parent. Alternatively, pass a custom business key from the parent process to both subprocesses.

### Timing requirement

> [!WARNING]
>
> The catch event must be in a **waiting state** (its token must have arrived on the node) **before** the throw event fires. If the throw executes before the catch is ready, the message will not be delivered and correlation will fail.
>
> When using async subprocesses, ensure the subprocess containing the catch event has enough time to reach the catch node before the throw event is triggered in another subprocess.

The communication works as follows: you receive a message on a Kafka topic - `${kafka.topic.naming.prefix}.core.message.event.process${kafka.topic.naming.suffix}`. The engine listens here and writes the response.

## Message events configuration

* `attachedTo`: a property that applies to boundary events
* `messageName`: a unique name at the database level, must be the same for throw and catch events (configured via the "Correlate with" dropdown in the Designer)
* `correlationKey`: an expression that resolves to a value used to match the throw event with the correct catch event instance
* `data`: allows defining the JSON message body mapping as output and input

### Data example

```json theme={"dark"}
{
	"document":{
			"documentId": "${document.id}",
			"documentUrl": "${document.url}"
	}
}
```


## Related topics

- [Intro to BPMN](https://docs.flowx.ai/6.x/docs/platform-overview/frameworks-and-standards/business-process-industry-standards/intro-to-bpmn.md)
- [Message Start Event](https://docs.flowx.ai/6.x/docs/building-blocks/node/message-events/message-catch-start-event.md)
- [Message throw intermediate event](https://docs.flowx.ai/6.x/docs/building-blocks/node/message-events/message-intermediate/message-throw-intermediate-event.md)
- [Message catch boundary events](https://docs.flowx.ai/6.x/docs/building-blocks/node/message-events/message-catch-boundary-event.md)
- [Intermediate message events in business processes](https://docs.flowx.ai/6.x/docs/building-blocks/node/message-events/message-intermediate/example-intermediate-message-events.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.