Created attachment 804922[details]
log
Description of problem:
I have two process definitions with the same signal ('Continue'). When both are waiting for the signal the EventTypes table looks like:
mysql> select * from EventTypes;
+------------+------------+
| InstanceId | eventTypes |
+------------+------------+
| 1 | Continue |
| 2 | Continue |
+------------+------------+
When I try to signal either one of these instances then I get a message similar to the following: 'java.lang.RuntimeException: Could not find process BPMN2-ConvergingGateway when restoring process instance 2'.
JpaProcessPersistenceContext.getProcessInstancesWaitingForEvent() returns both of these instances but one of them does not belong into the context. Looking at the JPASignalManager class there is an attempt made to capture errors when an invalid ksession is used. In this case the exception will not be caught.
How to reproduce:
1) create an instance of both definitions (attached) and make them wait for the signal
2) restore one of the sessions and send the "Continue" signal.
- the above error should be present in log (see attached log for full stack)

Alright, now I see what the actual issue is - so there are different RuntimeManagers/kbases used for signal. And since both use the same same they are both tried to be signaled but then the ksession does not have reference to both process definitions.
I believe the best would be to extend the catch clause to catch RuntimeExceptions as well and log it instead of failing on it. So information will be given why it failed but others that are possible to be signaled will be triggered.
Marek, if you agree with this then no need to attach source of the test.