Multiple RuntimeEngines are not disposed properly when created in the same Transaction. When a RuntimeEngine is created there is a transaction synchronization (DisposeSessionTransactionSynchronization) created to dipose it after the transaction commits. All instances of DisposeSessionTransactionSynchronization are identical according to their compareTo method, which is what the TransactionSynchronizationContainer uses when storing them. So only one synchronization gets stored and when the transaction commits there are stale runtime engines present. There's a jira already opened for this issue and a fix is already created [1] Can we push this fix to the next release? [1] https://github.com/droolsjbpm/jbpm/commit/284a8018072000d8cfae40348dd6778241aeaf19
Setting to MODIFIED as the fix is already upstream.
Verified in BPMS 6.1.0.ER2. The test is implemented in QE regression suite: https://gitlab.mw.lab.eng.bos.redhat.com/bxms/brms/commit/cf4a8a00b0b63104e92e3e4248ff5ab9181fb0ef as BZ1163965MultipleRuntimeEngineTest.