Using the SuspendActivity Activity 

The SuspendActivity activity temporarily stops the execution of the current workflow. Typically, you use the SuspendActivity activity to reflect an error condition that requires attention by an administrator.

When a workflow instance is suspended, an error is logged. You can specify a message string to accompany the error to help the administrator diagnose the problem with the SuspendActivity Error property. A suspended workflow instance can still receive messages that are queued up until the workflow is restarted. All the state information for the workflow instance is saved and is reinstated when the administrator resumes the instance (using Resume).

NoteNote

You cannot use a SuspendActivity activity in a TransactionScopeActivity activity or a CompensatableTransactionScopeActivity activity.

For more information, see the SuspendActivity class of the System.Workflow.ComponentModel namespace in the Windows Workflow Foundation Class Library reference.

For a code sample that demonstrates how to use the SuspendActivity activity, see Using Suspend and Terminate.

See Also

Footer image
Send comments about this topic to Microsoft.
Show: