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");
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈