[
https://jira.jboss.org/jira/browse/JBPM-1887?page=com.atlassian.jira.plug...
]
Alejandro Guizar commented on JBPM-1887:
----------------------------------------
The CVS history is available from fisheye:
http://fisheye.jboss.com/browse/JBPM/jbpm.3/jpdl/jar/src/main/java/org/jb...
Tag jpdl_3_2 is set to revision 1.9, whereas jpdl_3_2_2 is set to 1.12.
In GraphElement revision 1.11, the following change was made to method raiseException()
339 349 ExceptionHandler exceptionHandler = findExceptionHandler(exception);
340 350 if (exceptionHandler!=null) {
341 351 executionContext.setException(exception);
342 --- exceptionHandler.handleException(executionContext);
+++ 352 exceptionHandler.handleException(this, executionContext);
343 353 isHandled = true;
344 354 }
The enclosing changeset is
http://fisheye.jboss.com/changelog/JBPM?cs=MAIN:tbaeyens:20070611103928
The related change to ExceptionHandler (1.2) is the cause of this issue:
55 -- public void handleException(ExecutionContext executionContext) throws Exception {
++ 55 public void handleException(GraphElement graphElement, ExecutionContext
executionContext) throws Exception {
56 56 if (actions!=null) {
57 57 Iterator iter = actions.iterator();
58 58 while (iter.hasNext()) {
59 59 Action action = (Action) iter.next();
60 -- action.execute(executionContext);
++ 60 graphElement.executeAction(action, executionContext);
61 61 }
62 62 }
63 63 }
Before, when the action execution threw an exception, the exception would reach
GraphElement.raiseException(), which raises it in the *parent* graph element. After the
above change, the exception is caught inside GraphElement.executeAction, which raises it
in the *same* graph element.
I agree an exception should not be handled if the execution context is already handling an
earlier exception. Since raiseException() is called from multiple places, it is probably
better to move the check inside raiseException().
ExceptionHandler may cause infinite loop
----------------------------------------
Key: JBPM-1887
URL:
https://jira.jboss.org/jira/browse/JBPM-1887
Project: JBoss jBPM
Issue Type: Quality Risk
Security Level: Public(Everyone can see)
Components: Core Engine
Affects Versions: jBPM 3.2.2, jBPM 3.2.3, jBPM 3.3.0 GA
Environment: Windows XP, Java 1.6
Reporter: Marko Petersen
Assignee: Bernd Ruecker
Fix For: jBPM 3.3.2 GA
In case an exception handler class is not available (or causes an exception itself),
3.1.2 and 3.2GA stopped executing the process flow. After upgrading to 3.2.2 or above
(have not tried 3.2.1), if the exception handler class is not available or causes an
exception, that exception seems to be handled by the same exception handler - causing an
(infinite ?) loop. Might this be a bug or is the new behaviour intended? Or am I missing
something?
Thanks for any help.
Marko
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira