Skip to content

Commit

Permalink
Workflow terminate/purge: remove non_recursive query option (#4008)
Browse files Browse the repository at this point in the history
* Updates workflow terminate/purge `non_recursive` query to `recursive`

Updates from PR dapr/dapr#7498

Signed-off-by: joshvanl <[email protected]>

* Removes recursive workflow delete strategy from API completely

Signed-off-by: joshvanl <[email protected]>

---------

Signed-off-by: joshvanl <[email protected]>
Co-authored-by: Mark Fussell <[email protected]>
  • Loading branch information
JoshVanL and msfussell authored Feb 9, 2024
1 parent f439ffc commit 649e91f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Child workflows have many benefits:

The return value of a child workflow is its output. If a child workflow fails with an exception, then that exception is surfaced to the parent workflow, just like it is when an activity task fails with an exception. Child workflows also support automatic retry policies.

Terminating a parent workflow terminates all of the child workflows created by the workflow instance. You can disable this by setting the query parameter `non_recursive` to `true` while sending the terminate request to the parent workflow. See [the terminate workflow api]({{< ref "workflow_api.md#terminate-workflow-request" >}}) for more information.
Terminating a parent workflow terminates all of the child workflows created by the workflow instance. See [the terminate workflow api]({{< ref "workflow_api.md#terminate-workflow-request" >}}) for more information.

## Durable timers

Expand Down
12 changes: 5 additions & 7 deletions daprdocs/content/en/reference/api/workflow_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ 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[?non_recursive=false]
POST http://localhost:3500/v1.0-beta1/workflows/<workflowComponentName>/<instanceId>/terminate
```

{{% alert title="Note" color="primary" %}}
Terminating a workflow terminates all of the child workflows created by the workflow instance. You can disable this by setting the query parameter `non_recursive` to `true`.
Terminating a workflow terminates all of the child workflows created by the workflow instance.

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

{{% /alert %}}
Expand All @@ -73,7 +73,6 @@ 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 @@ -179,11 +178,11 @@ 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[?non_recursive=false]
POST http://localhost:3500/v1.0-beta1/workflows/<workflowComponentName>/<instanceId>/purge
```

{{% alert title="Note" color="primary" %}}
Purging a workflow purges all of the child workflows created by the workflow instance. You can disable this by setting the query parameter `non_recursive` to `true`.
Purging a workflow purges all of the child workflows created by the workflow instance.

{{% /alert %}}

Expand All @@ -193,7 +192,6 @@ 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 649e91f

Please sign in to comment.