Microsoft Flow – Implementing a Try, Catch , Finally in a flow

Try, Catch and Finally

For most developers the Try, Catch, Finally  construction is a very common way of handling errors. Within Microosft flow this is also possible.

Today I setup a flow with a manual start and 3 Scopes. I renamed the scopes to Try, Catch and Finally.

Catch

Then for the Catch I set the run after to has failed

Finally

and for the finally scope I ticked all the boxes in the the run after configuration

The only limitation to this solutions that I have found so far it that you can’t collect any exceptions that may be generated. Hopefully soon Microsoft Flow will give the option to collect exceptions.

 

See also, Microsoft Flow – You only need one template to get started

 

Advertisements

11 thoughts on “Microsoft Flow – Implementing a Try, Catch , Finally in a flow

  1. Thank you, Peter! I was wondering about the best way to do try catch. I really like your approach because Scope clearly show what is inside Try, Catch and Finally. Without scopes – it was a total mess.

    Like

  2. It’s to bad the try scope will trigger the “Flow run failed.” message instead of showing success due to the catch scope.

    Like

      1. I agree with you there. To clarify, my issue is when a “failure” is an acceptable completion of the flow there should be a way to not say it failed.

        Liked by 1 person

Leave a Reply to Klaas Huizenga Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.