Skip to content

Commit

Permalink
Adding recursive terminate/purge in workflow api
Browse files Browse the repository at this point in the history
Signed-off-by: Shivam Kumar <[email protected]>
  • Loading branch information
shivamkm07 committed Jan 25, 2024
1 parent b0dafe0 commit 647f9ac
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions daprdocs/content/en/reference/api/workflow_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,23 @@ The API call will provide a response similar to this:
Terminate a running workflow instance with the given name and instance ID.

```
POST http://localhost:3500/v1.0-beta1/workflows/<workflowComponentName>/<instanceId>/terminate
POST http://localhost:3500/v1.0-beta1/workflows/<workflowComponentName>/<instanceId>/terminate[?non_recursive=false]
```

{{% alert title="Note" color="primary" %}}
Terminating a workflow will terminate all of the child workflows created by the workflow instance. This can be disabled by setting the query parameter `non_recursive` to `true`.

Terminating a workflow will have no effect on any in-flight activity executions that were started by the terminated instance.

{{% /alert %}}

### URL parameters

Parameter | Description
--------- | -----------
`workflowComponentName` | Use `dapr` for Dapr Workflows
`instanceId` | Unique value created for each run of a specific workflow
`non_recursive` | (Optional) Boolean to determine if Dapr should not recursively terminate child workflows created by the workflow instance, default value is false.

### HTTP response codes

Expand Down Expand Up @@ -171,15 +179,21 @@ None.
Purge the workflow state from your state store with the workflow's instance ID.

```
POST http://localhost:3500/v1.0-beta1/workflows/<workflowComponentName>/<instanceId>/purge
POST http://localhost:3500/v1.0-beta1/workflows/<workflowComponentName>/<instanceId>/purge[?non_recursive=false]
```

{{% alert title="Note" color="primary" %}}
Purging a workflow will purge all of the child workflows created by the workflow instance. This can be disabled by setting the query parameter `non_recursive` to `true`.

{{% /alert %}}

### URL parameters

Parameter | Description
--------- | -----------
`workflowComponentName` | Use `dapr` for Dapr Workflows
`instanceId` | Unique value created for each run of a specific workflow
`non_recursive` | (Optional) Boolean to determine if Dapr should not recursively purge child workflows created by the workflow instance, default value is false.

### HTTP response codes

Expand Down

0 comments on commit 647f9ac

Please sign in to comment.