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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Do
    • Affects Version/s: 7.0.0.GA
    • Fix Version/s: None
    • Component/s: BRE
    • Labels:
    • Target Release:
    • Steps to Reproduce:
      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! ****
    • Sprint:
      2018 Week 15-16

      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?

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  swiderski.maciej Maciej Swiderski
                  Reporter:
                  tkobayashi Toshiya Kobayashi
                  Tester:
                  Marian Macik
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: