Stop an Instance
Stops a running Instance of a Workflow.
Permissions Required
Find and Edit permissions are required for an Instance in order to stop it. The Instance Owner has implicit Find and Edit permissions, and can always stop Instances they own.
Method Signature
Instance stop(String id);
Parameters
Parameter | Type | Description |
---|---|---|
id | String | The id of the Instance to stop |
returns | Instance | The stopped Instance |
Example
/*
* This example demonstrates stopping an Instance by ID
*/
import org.catalytic.sdk.CatalyticClient;
import org.catalytic.sdk.entities.Instance;
public class Program {
public static void main(String[] args) throws Exception {
// Create and initialize CatalytiClient
CatalyticClient catalytic = new CatalyticClient();
// End a specific instance by id
Instance instance = catalytic.instances().stop("c9f2beec-10c0-4f2f-b4e0-1d884c7e053c");
}
}
Updated almost 4 years ago