Getting Exception: Cannot correlate message 'Message1': No process definition matches the parameters

I am starting my process as below:
runtimeService.startProcessInstanceByMessage(“Start”, “Test Message”).getProcessInstanceId();
In Task1 , i am trying send message and correlate “Message1”, when i am doing this getting above exception.

${execution.getProcessEngineServices().getRuntimeService().createMessageCorrelation(“Message1”).processInstanceBusinessKey(“Test Message”).correlateStartMessage()}

I have attached bpmn script.

I am unable understand the message correlation concept in camunda.
Appreciate your advice.

Thanks.

Is the Customer process modeled in BPMN as well and runs in Camunda? If yes, please post the model. If no, message correlation via Camunda APIs does not make sense in Task1.

Cheers,
Thorben

Thanks Thorben.
Customer process modeled is not a BPMN script. I would want to achieve the conversation between 2 users.
User -> Belongs to Camunda Engine
Customer -> Other application which communicate with camunda

Customer initiates the conversation:

It’s like question and answer:
Customer : Hi, How u?
User: I am good,how are u?

Can it be possible.

It’s certainly possible to build something like that depending on the technologies you want to use. I’m not sure if BPM and BPMN are the right tools for your use case (i.e. very short, detailed and time-critical interactions), but I don’t understand it well enough to make a judgement.

edit: at the same time, Camunda and BPMN are no out-of-the-box solution for what you want to achieve. Maybe it is best to first choose the technologies you want to use for customer interaction, and then see if Camunda BPM fits to drive this interaction, based on whichever interfaces and APIs the other technology provides.

Thanks Thorben :slight_smile: :slight_smile: :slight_smile:

I am getting the following error

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

I have two processes A and B. I am able to correlate message from A to B but the reverse is throwing the above error. What could be the reason for this issue.

Any idea to resolve this?

Regards,
Vinu

Hi @vinu_s, have you found a solution? I encounter the exact same problem.