Message types¶
A message type is a named set of fields that one process sends to another. It is the contract behind a message event: the sender fills the fields, the receiver gets them as case data.
Creating a message type¶
- Open the process in the canvas.
- In Process objects, choose Message Types and create a new one.
- Give it a name.
- Add one field per value the message carries.
- Save.
Fields can be edited and deleted while the type is open; the change applies to the events that use the type.
What the fields become¶
Each field of the message is delivered to the receiving case as a case variable with the same name. That is why a message type is not just documentation: it decides which variables the receiving process can read after the event fires.
Two consequences:
- A field renamed in the message type stops matching the variable the receiving process reads.
- A field the sender does not fill arrives empty, not missing.
Where a message type is used¶
| Place | Role |
|---|---|
| Send Message (intermediate or end event) | The event fills the fields and sends them |
| Receive Message (start or intermediate event) | The event receives the fields and stores them in the case |
A message type does not send anything by itself: it only describes the payload. The event does the sending, and the event's properties are where you pick the type and map its fields.
Message type or process variable?¶
- A process variable lives in one case.
- A message type travels between two processes.
When two processes must agree on a structure, define it once as a message type rather than agreeing on variable names by hand.
Related¶
- Events — start, intermediate and end message events.
- Variables — the case data the fields become.
- Designer canvas — where the process objects live.