WorkflowControlClient.Suspend Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Suspends the specified workflow instance.
Overloads
Suspend(Guid) |
Suspends the specified workflow instance. |
Suspend(Guid, String) |
Suspends the specified workflow instance. |
Suspend(Guid)
Suspends the specified workflow instance.
public:
void Suspend(Guid instanceId);
public void Suspend (Guid instanceId);
member this.Suspend : Guid -> unit
Public Sub Suspend (instanceId As Guid)
Parameters
- instanceId
- Guid
The workflow instance to suspend.
Examples
The following example shows how to suspend a workflow instance with the WorkflowControlClient.
IWorkflowCreation creationClient = new ChannelFactory<IWorkflowCreation>(new BasicHttpBinding(), "http://localhost/DataflowControl.xaml/Creation").CreateChannel();
Guid instanceId = creationClient.CreateSuspended(null);
WorkflowControlClient controlClient = new WorkflowControlClient(
new BasicHttpBinding(),
new EndpointAddress(new Uri("http://localhost/DataflowControl.xaml")));
// ...
controlClient.Suspend(instanceId);
Applies to
Suspend(Guid, String)
Suspends the specified workflow instance.
public:
void Suspend(Guid instanceId, System::String ^ reason);
public void Suspend (Guid instanceId, string reason);
member this.Suspend : Guid * string -> unit
Public Sub Suspend (instanceId As Guid, reason As String)
Parameters
- instanceId
- Guid
The workflow instance to suspend.
- reason
- String
The reason to suspend the workflow instance.
Examples
The following example shows how to suspend a workflow instance with the WorkflowControlClient.
IWorkflowCreation creationClient = new ChannelFactory<IWorkflowCreation>(new BasicHttpBinding(), "http://localhost/DataflowControl.xaml/Creation").CreateChannel();
Guid instanceId = creationClient.CreateSuspended(null);
WorkflowControlClient controlClient = new WorkflowControlClient(
new BasicHttpBinding(),
new EndpointAddress(new Uri("http://localhost/DataflowControl.xaml")));
// ...
controlClient.Suspend(instanceId, "Sample to suspend");