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?
- is cloned by
-
RHDM-614 WorkflowRuntimeException wraps only the most bottom root cause Exception in RuleSetNodeInstance
- Closed