[jboss-user] [jBPM] - How to handle failed processes/states due to server crashes?

Michael Rinne do-not-reply at jboss.com
Mon Aug 2 14:11:12 EDT 2010

Michael Rinne [http://community.jboss.org/people/mrinneL1] replied to the discussion

"How to handle failed processes/states due to server crashes?"

To view the discussion, visit: http://community.jboss.org/message/555485#555485


Concerning exception handling, I saw that advice to take care of exceptions in the user code a couple of times in this forum, but I am not totally convinced that this is capable to handle all cases that arise in BPM.

Let us assume I have a process definition containing the sequence state1 -> task1 -> task2 -> state2. Let us further assume there is some sort of dependency between task1 and task2, i.e. if task2 fails we have to perform some kind of undo for task1. If I handle exceptions within the user code for task2 I am not able to undo task1, because I do not want task2 to know about task1. For the same reason, I do not want to combine task1 and task2 into a single task.

The solution in jpdl 4 seems to be adding another transition from task2 to a task "undo_task1" and any exception in task2 will make sure that we take the transition to "undo_task1". Another transition from "undo_task1" will lead back to state1 and of course we add a decision in order to prevent processing from taking this circle endlessly.

However, an exception-handler as provided by jpdl 3 seems to be a convenient way to handle most exceptions on a BPM scale, although it will most likely not be as flexible as the explicit solution sketched above.

What are you opinions on this?
Does anyone have a better idea on how to do exception handling on BPM scale with jpdl 4?



Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100802/c324852f/attachment.html 

More information about the jboss-user mailing list