語言

WorkflowControlClient.Abandon 方法

定義

放棄一個工作流程實例。

多載

名稱 Description
Abandon(Guid)

放棄指定的工作流程實例。

Abandon(Guid, String)

放棄指定的工作流程實例。

Abandon(Guid)

放棄指定的工作流程實例。

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

參數

instanceId
Guid

該放棄的工作流程實例。

範例

以下範例說明如何放棄帶有 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.Unsuspend(instanceId);
// ...
controlClient.Abandon(instanceId);

適用於

Abandon(Guid, String)

放棄指定的工作流程實例。

public:
 void Abandon(Guid instanceId, System::String ^ reason);
public void Abandon(Guid instanceId, string reason);
member this.Abandon : Guid * string -> unit
Public Sub Abandon (instanceId As Guid, reason As String)

參數

instanceId
Guid

該放棄的工作流程實例。

reason
String

放棄工作流程實例的原因。

範例

以下範例說明如何放棄帶有 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.Unsuspend(instanceId);
// ...
controlClient.Abandon(instanceId, "Sample to abandon");

適用於