Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-10002

Using the Spring integration, the data of a nested transaction is flushed even if the transaction is rolled back

    XMLWordPrintable

Details

    Description

      Context

      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.

      Problem

      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.

      AT

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

      Hints

      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.

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              thorben.lindhauer Thorben Lindhauer
              philipp.ossler Philipp Ossler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce