Details
-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
Description
Using the correlateAll[WithResult] API with the same correlation in a single transaction raises an exception.
runtimeService.createMessageCorrelation("waitForCorrelationKeyMessage") .setVariables(variablesFistCall) .processInstanceVariableEquals("correlationKey", "someCorrelationKey") .correlateAllWithResult();
org.camunda.bpm.engine.ProcessEngineException: Execution with id '109' does not have a subscription to a message event with name 'waitForCorrelationKeyMessage': eventSubscriptions is empty
The reason for this is that the second correlate call still finds the execution matching the correlation in the database but not the event subscription inside the cache as it was already removed by the first correlation call.
We would expect that the first correlation call triggers the correlation and the second one returns with an empty result without raising an error.