I have created a workflow service to handle some business process at my company. The initial version that had no exception handling in play worked fine when all the constituent parts were working. But, I have no reason to believe that it will always be the case. Databases and other dependencies will go down at times. So, I should try to ensure that my code is resilient to these issues.
My thinking was that I would do try/catch within my coded activities and return a bool that showed whether the code was successfully completed or not. Then, I wrapped that coded activity in a XAML file that would send an error notification and then loop to a one minute delay, then retry - doing this until the problem was resolved.
On my development machine, it works fine. I can bring the database down, and the error handling kicks in, sending the error notification, delaying, and trying again. When I bring the DB back up, it succeeds and moves on.
When I deploy it to our test server, it doesn't work at all. I'm not talking about existing workflows started with the old service's configuration, but with NEW workflows. The workflow will not start correctly, and eventually I get ServerTooBusy exceptions.
I don't know if this is an acceptable way to code WF activities for resilience. I don't know how to troubleshoot this. I could sure use some help.
Thanks in advance!
You need to see the tracking data to know what is going on in your test server. See Troubleshooting Workflow Services with diagnostic logging