Message Event
An event triggered by an incoming message — starts a process, or pauses one until a correlated message arrives.
A message event (drawn with an envelope icon inside its circle) fires when a message with a matching name arrives, rather than on a timer or a manual trigger. A message start event begins a new process instance when a message arrives; a message intermediate catch event pauses an already-running instance until one arrives.
On Camunda 8, an intermediate message catch event needs a correlation key — a FEEL expression identifying which specific process instance the incoming message belongs to (e.g. matching an order ID), since many instances of the same process can be waiting on the same message name at once.
Example
Bpmn.createProcess("order-flow")
.startEvent("start", { messageName: "OrderReceived" })
.serviceTask("reserve-stock", { taskType: "reserve-stock" })
.intermediateCatchEvent("wait-payment", {
messageName: "PaymentConfirmed",
correlationKey: "= orderId",
})
.serviceTask("ship", { taskType: "ship-order" })
.endEvent("end")
.withAutoLayout()
.build();