Hi,
Here is my model:
That seems correct to me 
But when I’m trying to throw message event to run event subprocess I receive error:
org.camunda.bpm.engine.ProcessEngineException:
Error while evaluating expression: ${execution.getProcessEngineServices()
.getRuntimeService()
.correlateMessage("Message_task3starter", variables)}.
Cause: org.camunda.bpm.engine.MismatchingMessageCorrelationException:
Cannot correlate message 'Message_task3starter':
No process definition or execution matches the parameters
Is that model feasible at all and what might be wrong with correlation if so?
regards
–leo
I thought that means that it is not allowed to use message as a start point of embedded subprocess per se.
Hi @Leonid_Toporkov,
your process model is correct. You can use a non-interrupting event based subprocess starting wit a message event.
Where do you do the message correlation?
In BPMN it is not allowed to correlate a message to the same process instance, although the Camunda process engine is not as restrictive as the BPMN 2.0 specification.
Cheers, Ingo
@Ingo_Richtsmeier
Thanks, here is real part of diagram, it’s a bit more complicated, but still very simple:
we use Expression as a correlation implementation at Message Throw Event:
<bpmn:messageEventDefinition id="MessageEventDefinition_1gnm5dd"
messageRef="Message_2fjued0"
camunda:expression="${execution.getProcessEngineServices()
.getRuntimeService()
.correlateMessage("Message_sendEmail", variables)}" />
Hi @Leonid_Toporkov,
you have to check the Asynchronous before box on both message send events in the process model.
Otherwise, the message receive event is not persisted in the database when you send the message to it.
Hope this helps, Ingo
2 Likes