Windows Workflow Foundation Exceptions and Retries?

I have a sequential workflow with several actions. One of these steps is to access my paid S3 account. It works fine, but to be careful, I would like to make sure that it can handle unforeseen situations such as "Host not found" or some timeout, etc.

So, I would usually put the code inside TRY / CATCH. This is fine .. but I'm not sure what I should do with the workflow .. because if the code does not complete correctly, the rest of the workflow should not occur (based on the logic of this workflow).

So, I wanted to possibly reconnect several times. And if this fails completely, invoke the email operation and complete the workflow.

Can anyone make any suggestions, links to vid or screenshots to help show what is the best practice for this?

Hooray!

+3
source share
2 answers

Take a look at FaultHandlerActivitywhich is used to handle the exception of the type indicated by the property FaultType. Some links about error handling in WF:

- Activity.HandleFault, , .

+2

Source: https://habr.com/ru/post/1699387/


All Articles