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 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應