-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
Steps to reproduce:
1. start a process instance with variable "a", value "aValue"
2. start a second process instance with variable "a", value "aValue"
3. suspend second process instance
4. try to correlate as follows:
Map<String, Object> correlationKeys = new HashMap<String, Object>(); correlationKeys.put("a", "aValue"); runtimeService.correlateMessage("aMessageName", correlationKeys);
-> a MismatchingMessageCorrelationException will be thrown:
Cannot correlate message aMessageName with process instance business key null and correlation keys {a=aValue}: 2 executions match the correlation keys. Should be one or zero.
Problem:
The suspended process instance has been also found.
Expected behavior:
Only active executions will be used to correlate a message.
Hint:
The same with a suspended ProcessDefinition. If a ProcessDefinition is suspendend it should not be possible to correlate against it, to start a new process instance.