Camunda Message API throwing error

In case of the workflow recon.bpmn (9.0 KB) The messages api is returning error in API call 1 out of 4 request sent. On retry it succeeds .

Please suggest what should be done.

@Niall If you can suggest what should we do ?

Hi Setuat,

Perhaps you could describe your error in more detail? What HTTP code, 40x, 50x etc?

Do you get a stack trace?

Perhaps you have a race condition in that the message is delivered before the preceeding external task has flushed task completion state to the engines database…




i am getting 4xx, posted the stack trace below. Please suggest if something needs to be changed in the workflow

400 : [{“type”:“RestException”,“message”:“org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message ‘source_recon_resume’: No process definition or execution matches the parameters”}]
at com.navi.medici.utils.workflowengine.workflow.CamundaWorkflowManager.resumeWorkflow(
at com.navi.medici.reconciliation.service.WorkflowService.resume(
at com.navi.medici.reconciliation.service.ReconService.lambda$resumeSource$2(
… 24 more
Caused by: org.springframework.web.client.HttpClientErrorException$BadRequest: 400 : [{“type”:“RestException”,“message”:“org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message ‘source_recon_resume’: No process definition or execution matches the parameters”}]
at org.springframework.web.client.HttpClientErrorException.create(
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(
at org.springframework.web.client.ResponseErrorHandler.handleError(
at org.springframework.web.client.RestTemplate.handleResponse(
at org.springframework.web.client.RestTemplate.doExecute(
at org.springframework.web.client.RestTemplate.execute(
at com.navi.medici.utils.workflowengine.workflow.CamundaClient.resumeWorkflow(
at com.navi.medici.utils.workflowengine.workflow.CamundaWorkflowManager.resumeWorkflow(
… 26 more


Ok the engine is saying its received your message, but there is no workflow instance waiting for that particular message, eg it cant correlate the message to a process instance.

Your workflow looks ok, however I notice that the preceeding task to the message correlation is an external task. Given you say it works on retry, I would suggest you have a race condition between completion of the external task and delivery of the message. Hence take a close look at the client app delivering the message to see if this is the case…