-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
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:
- A MainProcess.bpmn calls a sub-process named Sub.bpmn
- Sub-Process Sub.bpmn calls another sub-process named SubSub.bpmn
- 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.
- 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.
As you can see the 2nd test ( processAbortParentErrorTest ) fails because error process variable is null.
I guess that the expected behavior is not null.
- relates to
-
RHPAM-3474 Exception generated on subprocess is not correctly propagated to parent process
- Closed