WorkflowControlClient.Cancel(Guid) 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.
Cancels the specified workflow instance.
public:
void Cancel(Guid instanceId);
public void Cancel (Guid instanceId);
member this.Cancel : Guid -> unit
Public Sub Cancel (instanceId As Guid)
Parameters
- instanceId
- Guid
The workflow instance to cancel.
Examples
The following example shows how to cancel 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.Cancel(instanceId);
Applies to
Colabore connosco no GitHub
A origem deste conteúdo pode ser encontrada no GitHub, onde também pode criar e rever problemas e pedidos Pull. Para mais informações, consulte o nosso guia do contribuidor.