RestException 2 executions match the correlation keys

Doing the Camunda BPM tutorial on Youtube and in part 7 Tutorial: Messaging with BPMN (Video 7) - YouTube I try to send a message to my process that I have started with Postman. I get the error

{

"type": "RestException",

"message": "org.camunda.bpm.engine.MismatchingMessageCorrelationException: ENGINE-13031 Cannot correlate a message with name 'NiallKnows' to a single execution. 2 executions match the correlation keys: CorrelationSet [businessKey=1, processInstanceId=null, processDefinitionId=null, correlationKeys=null, localCorrelationKeys=null, tenantId=null, isTenantIdSet=false]"

}

When I look at the history of the process it seems that a new token is created after the first Send Task. Is that what causes this error and what should I do to resolve this?

Can you upload your model,
Also can you show the request you’re sending to trigger the message.

Thanks for the quick reply!

process.bpmn (11.1 KB)

Request:
{
“messageName” : “NiallKnows”,
“businessKey” : “1”,
“processVariables” : {
“confidence” : {“value” : “10”, “type”: “String”
}
}
}

You’ve got yourself an extra sequence flow going from the start event to the gateway. Removing it should work.

sequencefun

1 Like

Just to be clear - based on this question - ensure that you send a message to the NiallKnows message event as apparently i was able to help. :slight_smile:

1 Like

Wow you’re right haha, it was that simple! Thanks for all your help, I will try to remember this in the future :sweat_smile:

1 Like