[jboss-user] [JBoss jBPM] - Best practices for cancelling a workflow

pwfarwell do-not-reply at jboss.com
Sat Mar 24 15:16:03 EDT 2007

I need a way to cancel a workflow and have a handler fire, letting me know that the process was terminated abnormally. I'd like the handler to fire only when the process terminates in a non-standard way. For instance, I need to do some clean up of business code, clean up that I wouldn't have to do if the workflow ended normally.  

What's the recommended way to do this? 

I know about ProcessInstance.end(). Is there a way to create a handler or an event that let's me know (in Java code) when the workflow was terminated abnormally, ie. because of a call to end()?

As an alternative, I can associate a Node named "cancel" with each step of the workflow, and signal each Task/Node/State to transition to the "cancel" node. But that seems clumsy - since I'd have to define a "cancel" step for every workflow and create a transition to it from every workflow node.

A better way?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031327#4031327

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031327

More information about the jboss-user mailing list