Description:
This step removes the workflow instance by its instance ID, during runtime. Note: This step is to be executed only when necessary.
Inputs
- instanceID—id of the instance
Returns
- True – step executed successfully
- False – step failed to execute
Usage:
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/8802/direct/1690527853381-image.png)
Example:
Let’s build and execute the “removeWorkflowInstanceDef” example.
- Create a new definition called “removeWorkflowInstanceDef”
- Select the definition and click the “design” button
- Drag a “removeWorkflowInstance” step from the toolbox
- Connect the dots between the start and “removeWorkflowInstance” step
- Navigate to Run - Process Instance page. Select any process instance and take note of the instance ID.
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/8802/direct/1690528296485-image.png)
- Click on the "removeWorkflowInstance" step to configure its "Settings" properties. Provide a name to the step. Provide the workflow instance ID to be removed during runtime.
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/8802/direct/1690528365314-image.png)
- Save the process definition, create a new process instance and execute. The step removes the workflow instance ID as configured.
- Navigate to Run - Process Instance page. Search for the workflow instance ID to notice that it has been removed.
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/8802/direct/1690528788261-image.png)