Cannot correlate message ‘message5’: No process definition or execution matches the parameters

Hello,

I have my process that i want to implement but i’m stuck with message correclation,
process_2.bpmn:

process_2.bpmn (14.1 KB)

In the attached diagram, i use the mechanism of correlation to start other processes and they successfully starts, but when i want to make an callback from “pool3Process” to parent with expression : ${execution.getProcessEngineServices().getRuntimeService().createMessageCorrelation(“message5”).correlateWithResult()} in ‘End Event6’, i’m getting this error :

org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message ‘message5’: No process definition or execution matches the parameters

I’ve tried a few techniques that were suggested in this forum, but still no luck.

So, how do I properly notify parent process with message events and what is wrong with my process?

Thanks in advance.

P.s.: I’m running it in an Embedded Process Engine with spring framework

Hi @lahoucine,

I guess that the message can’t be correlated because the receive task is not entered yet. Message correlation is synchronous by default. So when the message is correlated at Task 1.1 or Task 1.2 then the next task is not entered until the new instance reaches a wait state.

To fix the process, you should correlate the message asynchronously using the async API call or an async-marker at the activity.

Does this help you?

Best regards,
Philipp

thanks Philipp for your help, I understood the problem, but I do not know how I can correlate the message in an asynchronous way, I used the asynchronous marker on the activity but it did not work

thanks you Philipp for your help, I understood the problem, but I do not know how I can correlate the message in an asynchronous way, I used the asynchronous marker on the activity but it did not work

Hi @lahoucine,

it should work if you mark the send activity with async-before.

However, I see another problem in your example process. I guess that the process in Pool3 doesn’t work as you expect. This process has two message start events with are joined on an inclusive gateway. If one of these messages is received then a process instance is created. The instance doesn’t wait for the other message.

You must model it in a way that you wait for the first and then for the second message.

Best regards,
Philipp

1 Like

Thanks @Philipp_Ossler for your help. The problem is fixed.