Question:
How can you stop a Workflow instance using the REST API & .NET SDK?
Answer:
Please refer to the following examples for the REST API and .NET SDK to stop workflow instances.
.NET SDK
From your code, when you retrieve the Task instance to be stopped, you would use the following line of code.
task.TaskOperations.ExtendedControllerOperations.DeleteInstanceRelation();
An example would be the following,
public static void StopWorkflowTask(WorkflowTask task)
{
task.TaskOperations.ExtendedControllerOperations.DeleteInstanceRelation();
}
REST API
The following is how you can setup the call from Postman
KBA is applicable for both Cloud and On-premise Organizations