Starting non-interrupting subprocess with message throw event

Hi,
I tried to start a non-interrupting subprocess with a message throw event after starting a process.
At the start of the process I got the following error:

The process could not be started. :
Cannot instantiate process definition Process_1:1:54ec8f2a-d036-11e7-84c3-0242ac120006: Error while evaluating expression: ${execution.getProcessEngineServices().getRuntimeService().createMessageCorrelation(“testMessage”).correlateWithResult()}. Cause: org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message ‘testMessage’: No process definition or execution matches the parameters

To solve the problem I had to use “Asynchronous Continuations” before the message throw event.

I found in the documentation something about subprocess subscription.

Is it safe using “Asynchronous Continuations” to solve this problem?
Can this error also happen with “Asynchronous Continuations”?

The bpmn and the image here:
messageExample.bpmn (7.0 KB)

Thanks,
Marco

A message cannot be delivered if the process instances destination is the same as the origin.
It’s part of the BPMN spec. What are you trying to do maybe there are better symbols to use. Like a signal or a conditional event

1 Like

Can you develop what you mean for destionation is the same as the origin?
I’ve the exact problem and I can’t see what you mean.

Basically a process instance cannot send a message to itself.
If you want communication without your own process use a conditional event or in some cases a signal event (although be aware you’ll need to use an expression as the signal name)

1 Like