WorkflowControlClient.Abandon 方法

定义

放弃工作流实例。

重载

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");

适用于