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

[GSS] (7.0.z) WorkflowRuntimeException wraps only the most bottom root cause Exception in RuleSetNodeInstance

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.0.2.GA
    • 7.0.0.GA
    • BRE
    • CR1
    • Hide

      Run attached ruleflow_ConsequenceException.zip (mvn test). You will see the message:

      Thrown Exception = class org.jbpm.workflow.instance.WorkflowRuntimeException
             getCause() = class java.lang.RuntimeException
      
      **** Cannot get ConsequenceException! ****
      
      Show
      Run attached ruleflow_ConsequenceException.zip (mvn test). You will see the message: Thrown Exception = class org.jbpm.workflow.instance.WorkflowRuntimeException getCause() = class java.lang.RuntimeException **** Cannot get ConsequenceException! ****

    Description

      In BRMS 6.4.0, when an Exception is thrown in RHS of a rule in rule-flow (= Business Rule Task), the root cause Exception is wrapped by org.kie.api.runtime.rule.ConsequenceException. Then the ConsequenceException is wrapped by org.jbpm.workflow.instance.WorkflowRuntimeException. ConsequenceException is useful for an application to get matched activation information for trouble-shooting.

      In RHDM 7.0.0, the root cause Exception is directly wrapped by WorkflowRuntimeException. So an application no longer be able to get a ConsequenceException.

      See attached ruleflow_ConsequenceException.zip (mvn test) to see the difference.

      The change was introduced by this commit.

      https://github.com/kiegroup/jbpm/commit/17da805fae
      https://github.com/kiegroup/jbpm/blob/7.5.x/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/RuleSetNodeInstance.java#L186-L197

      RuleSetNodeInstance.handleException() strips an Exception to the root cause Exception to find ExceptionScopeInstance to handle the Exception. However, if it concludes that there is no ExceptionScopeInstance to handle the Exception, shouldn't WorkflowRuntimeException wrap the entire exception (including ConsequenceException) instead of only the stripped "root cause" Exception?

      Attachments

        Issue Links

          Activity

            People

              swiderski.maciej Maciej Swiderski (Inactive)
              rhn-support-tkobayas Toshiya Kobayashi
              Marian Macik Marian Macik
              Marian Macik Marian Macik
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: