Cannot send event message


I am trying to send a message from one pool to another.
The problem is that there is no error but on the other hand I think the message is not sent at all.

Below is the model that I have created.
As you can see there is no token on the “Receive Message” pool.
The name of the message correlation is correct. I have downloaded this model from the forum.
In addition, when I send a message to an “intermediate event message”, then the token Is stuck at the “intermediate event message” and I don’t know how I can make it to continue the flow.

upload the model and the code you’re using the send the message

thank you for the quick reply.
Below you can find the model.
I use expressions for this particular case.

use_case_interprocess_messages_v2.bpmn (8.2 KB)

So i’m just wondering if you’re aware that when you have 2 pools in the same file they are deployed as 2 independent processes - So what you should be seeing in cockpit is 2 instances one in each process. Although both instances would not be visible in the same screen

No i didn’t notice that.

I checked it and it works perfectly. Thank you very much.

Now i am facing another issue.
I tried to send another message to a message intermediate catching event and i got an error which says that it cannot correlate the name of the message.

Below you can find a screenshot of the error and the model.

use_case_interprocess_messages_v2.bpmn (10.4 KB)

The problem is that you need to commit the transaction before the message can be sent.
So the token reaches the receive talk on time but don’t commit to the database until after the message send is triggered. You can read more abouttransactions in Camunda here - but it’s a really easy fix.

You can create a transaction boundary before you send the message by ticking the async before box.

unfortunately i tried that and it still gives an error.

" org.camunda.bpm.engine.ProcessEngineException: Error while evaluating expression: ${execution.getProcessEngineServices().getRuntimeService().createMessageCorrelation(“work2”).correlateWithResult()}. Cause: org.camunda.bpm.engine.MismatchingMessageCorrelationException: ENGINE-13031 Cannot correlate a message with name ‘work2’ to a single execution. 15 executions match the correlation keys: CorrelationSet [businessKey=null, processInstanceId=null, processDefinitionId=null, correlationKeys=null, localCorrelationKeys=null, tenantId=null, isTenantIdSet=false] "

use_case_interprocess_messages_v2 (3).bpmn (9.9 KB)

Sending messages needs a 1:1 correlation you have 15 instances waiting so it’s failing