[jboss-user] [jBPM] New message: "Exception Handling in node (v3.2)"
Arnoud Wolfard
do-not-reply at jboss.com
Wed Jan 13 17:05:33 EST 2010
User development,
A new message was posted in the thread "Exception Handling in node (v3.2)":
http://community.jboss.org/message/519899#519899
Author : Arnoud Wolfard
Profile : http://community.jboss.org/people/awolfard
Message:
--------------------------------------------------------------
Hi all,
Playing around with some jbpm code and I have a question regarding exception handling in a node.
What I want is the following:
When an exception occurs in my actionhandler I want to startup a task so a user can correct the process(-step) manually and signal the process again.
I came with this:
Node actionhandlers all extend the BaseNodeHandler:
public abstract class BaseNodeHandler implements ActionHandler {
public void execute(ExecutionContext executionContext) throws Exception {
try {
String returnValue = this.doExecute(executionContext);
if (returnValue == null) {
executionContext.leaveNode();
} else {
executionContext.leaveNode(returnValue);
}
} catch (Exception e) {
// Start up another process with a task (async tasknode) to deal with this situation?
// After manual correction give signal to continue processing?
}
}
public abstract String doExecute(ExecutionContext executionContext) throws Exception;
}
When an exception occurs the node is not propagated (leaveNode is not called) and therefore the state of the process is persisted (right?)
. Then I want to start up another process which creates a task (async tasknode) so a user can make some corrections.
Is it okay to start another process in the exception block?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/519899#519899
More information about the jboss-user
mailing list