[CAM-10002] Using the Spring integration, the data of a nested transaction is flushed even if the transaction is rolled back Created: 26/Mar/19  Updated: 05/Aug/19  Resolved: 18/Jul/19

Status: Closed
Project: camunda BPM
Component/s: engine
Affects Version/s: 7.7.0, 7.10.0
Fix Version/s: 7.12.0, 7.11.2, 7.12.0-alpha2

Type: Bug Report Priority: L3 - Default
Reporter: Philipp Ossler Assignee: Thorben Lindhauer
Resolution: Fixed Votes: 0
Remaining Estimate: 0 minutes
Time Spent: Not Specified
Original Estimate: 0 minutes

Issue Links:



The process engine uses the Spring integration with a JTA transaction manager.

Within a transaction T1, a new transaction T2 is opened via Propagation.REQUIRES_NEW.
A new process instance with an async. start event is created. After the job is created, an exception is thrown and T2 is rolled back. The exception is caught within T2 and T2 is committed successfully.


The process instance is created although the transaction T2 was rolled back. Since the process instance is created within the transaction T2, it should be rolled back with the transaction.


The process instance is not created if the transaction is rolled back.


It seems that a new transaction T2 is created and rolled back at the end. But the engine reuses the command context of T1 within T2 to create the process instance. So, the create command is flushed in T1 and not in T2. Because of this, the rollback of T2 has no effect on the command.

Comment by Nikola Koevski [ 09/Jul/19 ]


  1. We will provide a static method for explicitly declaring to the Process Engine that a new CommandContext needs to be created in the CommandContextInterceptor. Furthermore, a clear method will be provided to clear the declaration.
  2. A guide will be provided in the docs on how to handle inner transactions when using the Spring integration.
Generated at Sun Sep 22 08:34:21 CEST 2019 using JIRA 6.4.6#64021-sha1:33e5b454af4594f54560ac233c30a6e00459507e.