WorkflowControlClient.Suspend Metod

Definition

Inaktiverar den angivna arbetsflödesinstansen.

Överlagringar

Name Description
Suspend(Guid)

Inaktiverar den angivna arbetsflödesinstansen.

Suspend(Guid, String)

Inaktiverar den angivna arbetsflödesinstansen.

Suspend(Guid)

Inaktiverar den angivna arbetsflödesinstansen.

public:
 void Suspend(Guid instanceId);
public void Suspend(Guid instanceId);
member this.Suspend : Guid -> unit
Public Sub Suspend (instanceId As Guid)

Parametrar

instanceId
Guid

Arbetsflödesinstansen som ska pausas.

Exempel

I följande exempel visas hur du pausar en arbetsflödesinstans med 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);

Gäller för

Suspend(Guid, String)

Inaktiverar den angivna arbetsflödesinstansen.

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)

Parametrar

instanceId
Guid

Arbetsflödesinstansen som ska pausas.

reason
String

Anledningen till att inaktivera arbetsflödesinstansen.

Exempel

I följande exempel visas hur du pausar en arbetsflödesinstans med 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");

Gäller för