O'Reilly logo

Microsoft® Windows® Workflow Foundation Step by Step by Kenn Scribner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Suspend Activity

Another housekeeping activity you might find useful under certain conditions is the Suspend activity. In fact, a common-use case is to handle a fault using FaultHandler and then suspend the activity using Suspend to signal human intervention is required.

When you use the Suspend activity, you provide the activity with an error string through its Error property. This property can be bound to a dependency property (such as the Throw activity), a simple class property or field, or even a literal string (which we’ll do in the example to follow). When Suspend executes, the workflow runtime raises the WorkflowSuspended event and provides you with this error string in the event arguments.

Putting a workflow instance into a suspended ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required