Main difference between message and signal event

Hi,
Can someone please explain in simple terms when to use signal event and when to use message event?

Hi,

Think of a signal as a broadcast, whereas a message is more targeted to a single instance. So use a signal to communicate an event to multiple process instances, and a message to a single instance.

To use a contrived example, consider an order management system with many in-flight orders. Lets assume orders are pending confirmation of payment from an external payment gateway. In this case, payment confirmation should be a message because the payment event is likely targeted at a single, specific order.

Again a little contrived, but lets assume a particular product line is out of stock. In this case you may want to signal all outstanding orders to see if the item is in their basket and do something like initiate a refund or substitution…

regards

Rob

1 Like

Hi @Gus_fring,

a Signal in BPMN 2.0 is a broadcast, it notifies ALL waiting process instances to continue.

A Message in BPMN 2.0 is a one to one relationship. It has to notify a single process instance to contine.

In Camunda BPM, the API implementations are weakend, you can specify a single process instance to receive the signal as well as more process instances to receive a message. But using this features may confuse the readers of the process model.

Hope this helps, Ingo

3 Likes

Hi @Ingo_Richtsmeier ,
Can Signal have Zero recipients ?

1 Like

Hi @Avinash_Rawat,

yes.

Hope this helps, Ingo

3 Likes