Uploaded image for project: 'JBoss Enterprise SOA Platform'
  1. JBoss Enterprise SOA Platform
  2. SOA-1880

JobExecutor doesn't roll back the transaction even if the action handler throws Exception

    Details

    • Affects:
      Release Notes
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Call JbpmContext.setRollbackOnly() in the action handler

      Show
      Call JbpmContext.setRollbackOnly() in the action handler

      Description

      In case that Job execution of an async node is processed by JobExecutor, the transaction is not rolled back even if the action handler throws Exception/RuntimeException. The transaction is commtted and no retry happens. It looks inconsistent with docs:
      http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.3.CP02/html-single/JBPM_Reference_Manual/index.html#jbpmsbuiltinasynchronousmessaging
      ============
      If execution of a command message fails, the transaction will be rolled back. After that, a new transaction will be started that adds the error message to the message in the database. The command executor filters out all messages that contain an exception.
      ============

      I've attatched a reproducer.

      • unzip jobexecution.zip
      • modify build.properties
      • ant deploypar
      • ant deploy
      • ant ejbclient (or access jbpm-console to start process instance)
      • access jbpm-console to check process instance's id which is created by the action handler (which should be rolled back)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  aguizar Alejandro Guizar
                  Reporter:
                  tkobayashi Toshiya Kobayashi
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Due:
                    Created:
                    Updated:
                    Resolved: