P1 will publish a Message event which will be listened by P2 at intermediate step.
If P2 hasn’t reached wait state to receive Message event while P1 has completed processing and ready to publish event.
P2 has to complete certain steps before it’s ready to listen to Message event.
Above problem was resolved using ,
Enhanced problem statement:
The above solution works perfect when single instance of P2 is running.
But in our case we have multiple instances of P2 in which it fails. Same business key passed on to P1 and all instances of P2.
Message published using : runtimeService.createMessageCorrelation(“topic”).processInstanceBusinessKey(execution.getProcessBusinessKey()).correlateWithResult()
Please help me to find a solution for same asap.
Thank you in advance.