Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-1758

The process doesn't stop after an Exception when the "AsyncMode" environment entry is "true"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.3.0.GA
    • 7.1.1.GA
    • jBPM Core
    • AsyncMode = true

    • Hide

      Attached to this JIRA there is a reproducer which contains the following:

      • "decision-client"
        It is the source code of the reproducer. The class Case02252554Reproducer.java run the "SCRA_process" process of the container with the environment entry AsyncMode="true" (AsyncModeTrue method) and other container without AsyncMode environment entry (AsyncModeFalse method).
      • "project"
        It contains the jars "scra_process-1.0.0.jar" (with AsyncMode="true") and "scra_process_false-1.0.0.jar" (without AsyncMode).
      • "reproducer.sh"
        This script runs the tests.

      You should follow the next steps:

      1. Start your application.
      2. Run the "reproducer.sh" script inside the file and you will see the following results in the console.

      • AsyncModeTrue: when the Exception is thrown, the process continues and runs the next step (Script Task) before stopping.
        ~~~
        INFO [stdout] (Thread-48 (ActiveMQ-client-global-threads)) <<< Activity-1 >>> Reassign and set SLA
        INFO [stdout] (Thread-49 (ActiveMQ-client-global-threads)) <<< Activity-2 >>> Before Exception throw
        INFO [stdout] (Thread-49 (ActiveMQ-client-global-threads)) <<< Activity-2 >>> ExceptionType: uncheckedException
        INFO [stdout] (Thread-48 (ActiveMQ-client-global-threads)) <<< Exception Path. Activity.1 >>> Catch Exception
        INFO [stdout] (Thread-50 (ActiveMQ-client-global-threads)) <<< Activity-3 >>> Automatic Path
        ~~~
      • AsyncModeFalse: when the Exception is thrown, the process is stopped and the next step (Script Task) is not run.
        ~~~
        INFO [stdout] (default task-101) <<< Activity-1 >>> Reassign and set SLA
        INFO [stdout] (default task-101) <<< Activity-2 >>> Before Exception throw
        INFO [stdout] (default task-101) <<< Activity-2 >>> ExceptionType: uncheckedException
        INFO [stdout] (default task-101) <<< Exception Path. Activity.1 >>> Catch Exception
        ~~~
      Show
      Attached to this JIRA there is a reproducer which contains the following: "decision-client" It is the source code of the reproducer. The class Case02252554Reproducer.java run the "SCRA_process" process of the container with the environment entry AsyncMode="true" (AsyncModeTrue method) and other container without AsyncMode environment entry (AsyncModeFalse method). "project" It contains the jars "scra_process-1.0.0.jar" (with AsyncMode="true") and "scra_process_false-1.0.0.jar" (without AsyncMode). "reproducer.sh" This script runs the tests. You should follow the next steps: 1. Start your application. 2. Run the "reproducer.sh" script inside the file and you will see the following results in the console. AsyncModeTrue: when the Exception is thrown, the process continues and runs the next step (Script Task) before stopping. ~~~ INFO [stdout] (Thread-48 (ActiveMQ-client-global-threads)) <<< Activity-1 >>> Reassign and set SLA INFO [stdout] (Thread-49 (ActiveMQ-client-global-threads)) <<< Activity-2 >>> Before Exception throw INFO [stdout] (Thread-49 (ActiveMQ-client-global-threads)) <<< Activity-2 >>> ExceptionType: uncheckedException INFO [stdout] (Thread-48 (ActiveMQ-client-global-threads)) <<< Exception Path. Activity.1 >>> Catch Exception INFO [stdout] (Thread-50 (ActiveMQ-client-global-threads)) <<< Activity-3 >>> Automatic Path ~~~ AsyncModeFalse: when the Exception is thrown, the process is stopped and the next step (Script Task) is not run. ~~~ INFO [stdout] (default task-101) <<< Activity-1 >>> Reassign and set SLA INFO [stdout] (default task-101) <<< Activity-2 >>> Before Exception throw INFO [stdout] (default task-101) <<< Activity-2 >>> ExceptionType: uncheckedException INFO [stdout] (default task-101) <<< Exception Path. Activity.1 >>> Catch Exception ~~~

      Attached to this JIRA there is a process which allows us to indicate if we want to throw an exception of type:

      -Checked Exception ---: java.lang.InterruptedException
      -Unchecked Exception -: java.lang.RuntimeException
      -No exceptions -------: or no throw any exception

      Also it allows to select the path with the "Execute Activity 3" boolean parameter:

      -"Execute Activity 3" is "false" --> to execute the Human Task
      -"Execute Activity 3" is "true" ---> to execute the "Path alternative" Script Task

      When the Exception is thrown, it is catched by a subprocess and if the environment entry "AsyncMode" is "true", the process is not stopped. If the "AsyncMode" is "false" or doesn't exist, the process is stopped after the exception which is correct.

        1. Process_001.bpmn2
          37 kB
          Oscar Molina

              swiderski.maciej Maciej Swiderski (Inactive)
              rhn-support-omolinab Oscar Molina
              Marian Macik Marian Macik
              Marian Macik Marian Macik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: