WorkflowControlClient.Abandon 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.
Abandons a workflow instance.
Overloads
Abandon(Guid) |
Abandons the specified workflow instance. |
Abandon(Guid, String) |
Abandons the specified workflow instance. |
Abandon(Guid)
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)
Parameters
- instanceId
- Guid
The workflow instance to abandon.
Examples
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);
Applies to
Abandon(Guid, String)
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)
Parameters
- instanceId
- Guid
The workflow instance to abandon.
- reason
- String
The reason to abandon the workflow instance.
Examples
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");
Applies to
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για