Using the Terminate Activity
There are times when things get so bad that you have no recourse but to kill off a workflow instance. Perhaps some data came back from an external process in a bad format or was otherwise miscalculated. Or the database server simply disappeared and you can’t move forward without it. Or...well, hopefully, you see where this line of reasoning is going.
WF provides us with a ready-made way to terminate our workflow instances through the Terminate activity. The Terminate activity is used in precisely the same way as the Suspend activity, and in fact its properties are identical. The difference is that when Terminate executes, all hope for your workflow instance continuing execution is lost.
When Terminate executes, the workflow ...
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.