Cannot correlate message Error happens suddenly

I’m working on a project that was handed over.
The thing is that we have a process that is created in state A, and then moves from state A to B.
It works for 10 times, and then it gets “stuck” and on the same scenario I get HTTP 400 and the following error:

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

I’ve been running the flow over and over testing a new flow outside the Camunda component.
The code that calls the Camunda REST api and the Camunda Process we have in place have not been modified.
I’m not sure what happens, but I think that after enough time, it resets. restarting the Camunda service doesn’t help.
I’m not very knowledgeable in Camunda. So any help and pointers are welcome.

And thanks
Yossi

Hi Yossi,
if I understand it right you are saying that you have some process that is changing its state from A to B based on a message that is sent from rest API, am I correct?
If so, the message what you are receiving basically means that there is no “waiting process” to which you could correlate the message.
Are you sure that there is some process instance waiting for you message, when you receive that error?

Cheers,
Lukas

My code runs step A, and then step B and gets stuck.
What I have discovered is that I’m calling step B too fast.
after a short wait, it works.
This is why it sometimes worked when I was debuging. the breakpoints paused the code.