Throw Explanation in Reframework when used inside of Invoke Workflow in Process.xaml

As long as you don’t have the Throw surrounded by another Try/Catch in your invoked workflow, then the ReFramework should catch it. If you do have another Try/Catch, you need to use the Rethrow so the ReFramework can catch it.

Looking at your project, you have another Try/Catch surrounding the Throw in Sequence.xaml. I would suggest removing that Try/Catch and letting the Main.xaml catch it, as there is a Try/Catch in the Process state to catch all exceptions. The only time you need to use another Try/Catch inside your Process.xaml or other workflows is to catch specific scenarios and perform different tasks on it. Most of the time, however, you won’t want to use another Try/Catch and let the Main.xaml State Machine do all the error handling.

Hope that helps.

Note: use BusinessRuleException(“message”) for errors in the input that would keep the process from completing and Exception(“message”) for errors that are with the application that could be attempted again.

Regards.

3 Likes