cancel
Showing results for 
Search instead for 
Did you mean: 

Exception Handling with Retry

samsmith
Champ in-the-making
Champ in-the-making
Hi,

I have a BPM process that makes many service calls and also has 2 Human Tasks.  I now want to implement an Exception Handling to handle  Technical Exceptions (example: backend service is not responding, database is down etc).

Just wantwed to check if there is any recommended pattern that I can use.

What I don't want to do is use  a combination of 'Error End Event' and 'Error Boundary Event' against each Service call as this will make my process unmanageable.

Question 1: Can I use an 'Event Subprocess' that will act as 'Catch-All'. I mean if I get any error in any of the service call, that should move the instance automatically to the 'Event Subprocess'.

Question 2: In my Event-Subprocess, I intend to add a Human Task with an option of 'Retry' on the screen. This retry  should then move the instance back to the activity that had failed. Is this something that is possible in Activiti BPM.

2 REPLIES 2

samsmith
Champ in-the-making
Champ in-the-making
I have found the answer for point1. I can throw BPMError() from my JavaClass that implements JavaDelegate. This will makemy process look bit neater as this means that I will not have transitions coming out from each service task.

Not sure how can I go back to the failed activity from the 'Event Subprocess'.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Sam,

I am not aware of API which moves the execution from event subprocess to the defined activity. In fact it is easy to manage it in the DB (just change column value). The implementation is not so complicated in this case.

Regards
Martin