Loading and Unloading Instances on Idle

I mentioned earlier in the chapter that for our test application’s workflow we were going to use System.Threading.Thread.Sleep instead of using a Delay activity to introduce a delay in our workflow processing. I said at the time that I chose to do this because the Delay activity had special processing capabilities as far as persistence was concerned. Let’s now look briefly at what Delay does for us.

If you introduce a Delay activity into your workflow, clearly the intention is to suspend processing for some period of time, whether it’s an actual time period or a suspension until a specific point in time, such as a date five days in the future.

When a Delay activity is executed, assuming the workflow runtime ...

Get Microsoft® Windows® Workflow Foundation Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.