Hi!
I have a test process I’m playing with and I’m stuck with message correlation.
reg_test.bpmn (30.9 KB)
In an attached diagram I have a Java delegate in “Register” service task, which successfully starts another process with message event. I’m doing it like this:
execution.getProcessEngineServices().getRuntimeService()
.startProcessInstanceByMessage(“RegisterRequestReceivedMessage”, …);
But when I try to continue parent process with another message, I’m getting this “Cannot correlate message … : No process definition or execution matches the parameters” error.
I’ve tried a few techniques that were suggested in similar threads on this forum, but still no luck.
My last guess was that maybe I’m too fast at some points of execution, but additional timer event didn’t solved the problem.
I have this code in “Send Email/Sms” service tasks delegates:
execution.getProcessEngineServices().getRuntimeService() .createMessageCorrelation("EmailReceivedMessage") .correlateAllWithResult();
There’s no error with this, but the parent process didn’t proceeded with execution (it hangs on waiting for the messages). If I call API method though (http://localhost:8080/engine-rest/message), the process gets the message it waits for and continues, but it works only if do it manually (I guess there’s some problem with timing). If I do it with http connector from inside “intermediate throw event” (I know it’s not the way it designed to be used, but it was just a test) it also doesn’t works.
So, how do I properly notify parent process with message events and what is wrong with my process?
Thanks in advance.
P.s.: I’m running it in the latest camunda-jboss docker.