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

Exception generated on subprocess is not correctly propagated to parent process

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.11.0.GA
    • 7.8.1.GA
    • jBPM Core
    • None
    • False
    • False
    • CR1
    • +
    • Undefined
    • ---
    • ---
    • 2021 Week 07-09 (from Feb 15), 2021 Week 10-12 (from Mar 8)

      Attached a project that captures exceptions on a process (parent) and on subprocess launched on it.

      All the exceptions launched at same level as process throwing it are correctly captured, but if exception has to get trough subprocess to parent process event is turn into a null variable.

      From attached project:

      call directly the subprocess:

      curl -u rhpamAdmin:rhp4m4dm1n$ -X POST "http://localhost:8080/kie-server/services/rest/server/containers/dealwithexceptions/processes/com.DealWithExceptionSubProcess/instances" -H "accept: application/json" -H "content-type: application/json"

      19:16:20,322 INFO [stdout] (default task-193) Exception in sub process
      19:16:20,324 INFO [stdout] (default task-193) Exception caught in sup process java.lang.Exception: Error from subprocess

      Call parent process, but throw exception directly:
      curl -u rhpamAdmin:rhp4m4dm1n$ -X POST "http://localhost:8080/kie-server/services/rest/server/containers/dealwithexceptions/processes/com.DealWithException/instances" -H "accept: application/json" -H "content-type: application/json" -d "

      { \"launchOnParent\": true}

      "

      19:16:43,495 INFO [stdout] (default task-194) launch exception on parent
      19:16:43,497 INFO [stdout] (default task-194) Exception caught main process java.lang.Exception: Parent error

      Call parent process which call subprocess (where exception is thrown):

      curl -u rhpamAdmin:rhp4m4dm1n$ -X POST "http://localhost:8080/kie-server/services/rest/server/containers/dealwithexceptions/processes/com.DealWithException/instances" -H "accept: application/json" -H "content-type: application/json" -d "

      { \"launchOnParent\": false}

      "

      19:16:58,994 INFO [stdout] (default task-194) Exception in sub process
      19:16:58,997 INFO [stdout] (default task-194) Exception caught in sup process java.lang.Exception: Error from subprocess
      19:16:59,010 INFO [stdout] (default task-194) Exception caught main process null

      Looks like exception is not correctly propagated to parent.

              elguardian@gmail.com Enrique González Martínez (Inactive)
              afanjula@redhat.com Alberto Fanjul Alonso
              Antonio Fernandez Alhambra Antonio Fernandez Alhambra (Inactive)
              Antonio Fernandez Alhambra Antonio Fernandez Alhambra (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: