WorkflowInstance::Suspend Method (String^)
.NET Framework (current version)
Suspends the workflow instance.
Assembly: System.Workflow.Runtime (in System.Workflow.Runtime.dll)
Parameters
- error
-
Type:
System::String^
A description of the reason for suspending the workflow instance.
| Exception | Condition |
|---|---|
| InvalidOperationException | The workflow runtime engine is not running. |
The workflow instance is suspended in a synchronous manner. If the workflow instance is already suspended, no action is taken; otherwise, the workflow runtime engine suspends the workflow instance, raises the WorkflowSuspended event and passes reason in a WorkflowSuspendedEventArgs.
Note |
|---|
Suspend does not unload the workflow instance. |
The following code example demonstrates calling Suspend on a WorkflowInstance object.
.NET Framework
Available since 3.0
Available since 3.0
Show:
