Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-544

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 7.0.0.GA
    • BRE
    • 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! ****
    • 2018 Week 15-16

      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?

              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:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: