Clarity on Message Semantics

Hi,

I am finding a possible contradiction in the documentation regarding message events, hence Im confused as to what the correct behaviour should be.

In the message event section of the BPMN reference is this snippet

Unlike a signal, a message event is always directed at a single recipient.

However in the REST API deliver message reference, there is a description of the parameter all…

If the value is set to true the message will be correlated to multiple executions and a process definition that can be instantiated by this message in one go.

Hence the REST API gives me the impression that message delivery could behave a lot like a Signal contrary to the BPMN definition. Hence what behaviour should I expect?

regards

Rob

Hi @Webcyberrob,

A message is always a one to one communication. So the BPMN reference is correct. You are right, the REST API reference is a bit misleading in that context. We will adapt the REST documentation and clarify that.

Hope that helps :slight_smile:

Best,
Johannes

Hi,

MessageCorrelationBuilder#correlateAll (see Javadoc, this is what the all parameter in the REST API maps to) indeed triggers multiple catching message event with one correlation call, so one incoming message if you want. According to the BPMN spec a message is a one-to-one communication, so this should not be possible. But, well, in Camunda it is. That is the reason why the docs appear contradictory. Is your first quote from the BPMN implementation refernce on docs.camunda.org, or from the BPMN reference on camunda.org?

Cheers,
Thorben

Hi,

@thorben: I think what is a bit confusing is that the REST API suggest that one message is send to multiple instances. We should clarify that MessageCorrelationBuilder#correlateAll sends multiple messages, so that the one-to-one communication is still preserved :wink:

Best,
Johannes

Hi Johannes,

Ah, ok, I understand your idea. Sure, I’m fine with that.

Cheers,
Thorben

haha! best quote :stuck_out_tongue: