@Niall I am trying to correlate a message but I have a lot of messages and every message is connected to the login user.
So the user can run only a particular message but not all messages that are waiting to be executed.
So my message name looks like that: myHome-${execution.processBusinessKey}
the code that I am using in Java is:
runtimeService.createMessageCorrelation("myHome-" + home.get().getBusinessKey())
.processInstanceBusinessKey(home.get().getBusinessKey())
.setVariable(CustomerInteractionProcessConstants.Variables.CHOSEN_HOME,
choice.getHome())
.setVariable(CustomerInteractionProcessConstants.Variables.CHOSEN_HOTEL,
choice.getHotel())
.correlate();
And the error that I get is:
org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message ‘myHome-20210407378941000000001’: No process definition matches the parameters