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…

regards

Rob

@Webcyberrob

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(CamundaWorkflowManager.java:35)
at com.navi.medici.reconciliation.service.WorkflowService.resume(WorkflowService.java:46)
at com.navi.medici.reconciliation.service.ReconService.lambda$resumeSource$2(ReconService.java:142)
… 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(HttpClientErrorException.java:101)
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:170)
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:112)
at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674)
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:583)
at com.navi.medici.utils.workflowengine.workflow.CamundaClient.resumeWorkflow(CamundaClient.java:64)
at com.navi.medici.utils.workflowengine.workflow.CamundaWorkflowManager.resumeWorkflow(CamundaWorkflowManager.java:33)
… 26 more

Hi,

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…

regards

Rob