Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-10177

Exception generated in subprocess chain is not correctly propagated to parent process

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • KieServer
    • None
    • False
    • None
    • False
    • NEW
    • NEW
    • ---
    • ---
    • Important

      We came across a situation where if an exception is thrown in a Sub Process which is contained in a sub-process called from another process then the exception is not propagated to the first process in the process chain.

      Consider the following scenario:

      1. A MainProcess.bpmn calls a sub-process named Sub.bpmn
      2. Sub-Process Sub.bpmn calls another sub-process named SubSub.bpmn
      3. If an exception occurs in the latest sub-process (SubSub.bpmn) then the first process in process chain (MainProcess.bpmn) does not get notified of the error data when Abort-Parent attribute has set.
      4. Otherwise, if Abort Parent attribute has not been set then parent process gets the error information.

      After examining the source code, we would like to recommend the below change in SubProcessNodeInstance.java at line 353.

      Replace:

      ((ProcessInstance) getProcessInstance()).setState(ProcessInstance.STATE_ABORTED, faultName);

      With:

      ((ProcessInstance) getProcessInstance()).setState(ProcessInstance.STATE_ABORTED, faultName, faultData);

      in order to include the actual error data to be propagated to the parent process.

      In reproducer that is attached some unit test cases have been provided.

      process-error-handling.zip

      As you can see the 2nd test ( processAbortParentErrorTest ) fails because error process variable is null.

      I guess that the expected behavior is not null.

            kverlaen@redhat.com Kris Verlaenen
            bill_bouzas Vassilis Bouzas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: