Hi
I try to setup a simple process, that waits at a certain point upon a message, using an intermediateCatchEvent.
I set it according to: https://docs.camunda.org/manual/7.8/reference/bpmn20/events/message-events/
In the BPMN XML I have
...
<bpmn:intermediateCatchEvent id="event-message-go" name="hello-message">
<bpmn:incoming>SequenceFlow_1iqjlek</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1l8zutr</bpmn:outgoing>
<bpmn:messageEventDefinition messageRef="Message_0clcxrf" />
</bpmn:intermediateCatchEvent>
...
<bpmn:message id="Message_0clcxrf" name="hello-message-${execution.businessKey}" />
...
The event occurs after a simple delegate, that logs the businessKey.
When I test this process, wiht businessKey=“TestOk”, and try to correlate a message named “hello-message-TestOk”, it fails with
ENGINE-16004 Exception while closing command context: Cannot correlate message 'hello-message-TestOk': No process definition or execution matches the parameters
When investigating, I used:
List<EventSubscription> events = processEngine.getRuntimeService().createEventSubscriptionQuery().list();
and saw that the event registered name is “hello-message-”
And when I try to correlate with “hello-message-”, correlation is ok.
Is it a bug or an exepected behaviour? If so, how can I set the name based on the businessKey?