WorkflowControlClient.Abandon Método
Definição
Abandona uma instância de fluxo de trabalho.Abandons a workflow instance.
Sobrecargas
| Abandon(Guid) |
Abandona a instância de fluxo de trabalho especificada.Abandons the specified workflow instance. |
| Abandon(Guid, String) |
Abandona a instância de fluxo de trabalho especificada.Abandons the specified workflow instance. |
Abandon(Guid)
Abandona a instância de fluxo de trabalho especificada.Abandons the specified workflow instance.
public:
void Abandon(Guid instanceId);
public void Abandon (Guid instanceId);
member this.Abandon : Guid -> unit
Public Sub Abandon (instanceId As Guid)
Parâmetros
- instanceId
- Guid
A instância de fluxo de trabalho a ser abandonada.The workflow instance to abandon.
Exemplos
O exemplo a seguir mostra como abandonar uma instância de fluxo de trabalho com o WorkflowControlClient .The following example shows how to abandon 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.Unsuspend(instanceId);
// ...
controlClient.Abandon(instanceId);
Aplica-se a
Abandon(Guid, String)
Abandona a instância de fluxo de trabalho especificada.Abandons the specified workflow instance.
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)
Parâmetros
- instanceId
- Guid
A instância de fluxo de trabalho a ser abandonada.The workflow instance to abandon.
- reason
- String
O motivo para abandonar a instância de fluxo de trabalho.The reason to abandon the workflow instance.
Exemplos
O exemplo a seguir mostra como abandonar uma instância de fluxo de trabalho com o WorkflowControlClient .The following example shows how to abandon 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.Unsuspend(instanceId);
// ...
controlClient.Abandon(instanceId, "Sample to abandon");