How to handle multi exception handling in single workflow?


Having a few scenarios, One workflow contains many exceptions handling and many validations part.

Or any common handling methods available or not?

How to avoid the many try-catch activities in my workflow?


What is wrong with using multiple try catches out of interest? It will help you see in the logs and/or email notifications you send as part of the catch where things went wrong.

This seems like good practice to me!

If you are using the RE Framework, errors will be handled automatically by the process.

You can throw business exceptions where necessary too where common issues crop up e.g. invalid reference numbers

Try catches are fine but if you are just trying to catch a system exception you’re better off using REF as its done automatically and the process will be able to retry upon failure


Having try catch is a best practice - its best because the bot will gracefully exist by giving an exception message which can be user defined also. Helps debugging and makes code robust.

Avoiding try catch is like avoiding brakes to a car, it’s just counter-intuitive.

Regards :slight_smile:

PS : use Rethrow to bubble up the exception to the main workflow and handle it by logging/sending email etc.