Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workflow] Add purge/pause/resume/raise event to docs #3332

Merged
merged 40 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
de3bdf6
add new methods to api doc
hhunter-ms Apr 11, 2023
440b032
add methods to how to
hhunter-ms Apr 11, 2023
9717f6d
update after v1.10 upmerge
hhunter-ms Apr 12, 2023
5a814fc
updates per ryan
hhunter-ms Apr 12, 2023
180e1c6
Merge branch 'v1.11' of https://github.com/dapr/docs into issue_3316
hhunter-ms May 1, 2023
0480629
add raise event request
hhunter-ms May 1, 2023
ba52814
add raise event api to the howto
hhunter-ms May 1, 2023
32313dd
updates per Ryan;
hhunter-ms May 1, 2023
d81290a
Merge branch 'v1.11' of https://github.com/dapr/docs into issue_3316
hhunter-ms May 3, 2023
b8891b5
whitespace/updates
hhunter-ms May 3, 2023
9116c21
add more description to raise event
hhunter-ms May 5, 2023
9cd800e
clarify raise event and add to the dotnet sdk example
hhunter-ms May 8, 2023
956f94e
edit confusing text for raise event http
hhunter-ms May 8, 2023
6eb096f
updates per Ryan
hhunter-ms May 8, 2023
16393df
rearrange author workflows doc per Ryan suggestion
hhunter-ms May 8, 2023
e0e7547
update workflowreference to startworkflowresponse
hhunter-ms May 8, 2023
0580e9c
Merge branch 'v1.11' of https://github.com/dapr/docs into issue_3316
hhunter-ms May 9, 2023
bfe7f58
fix link
hhunter-ms May 9, 2023
617121a
Merge branch 'v1.11' into issue_3316
hhunter-ms May 9, 2023
8f94937
fix merge conflict
hhunter-ms May 9, 2023
730255a
Merge branch 'issue_3316' of https://github.com/hhunter-ms/docs into …
hhunter-ms May 9, 2023
f1b70ec
Merge branch 'v1.11' into issue_3316
hhunter-ms May 9, 2023
2511401
Merge branch 'v1.11' into issue_3316
hhunter-ms May 9, 2023
a0c3a3a
Merge branch 'v1.11' into issue_3316
hhunter-ms May 10, 2023
bd059a5
edit from ryan
hhunter-ms May 10, 2023
76b00db
Merge branch 'issue_3316' of https://github.com/hhunter-ms/docs into …
hhunter-ms May 10, 2023
45714a8
Merge branch 'v1.11' into issue_3316
hhunter-ms May 10, 2023
61e06f2
part 1 of mark review
hhunter-ms May 11, 2023
49e438b
Merge branch 'issue_3316' of https://github.com/hhunter-ms/docs into …
hhunter-ms May 11, 2023
969d403
Update daprdocs/content/en/reference/api/workflow_api.md
msfussell May 15, 2023
2ce695a
Merge branch 'v1.11' into issue_3316
msfussell May 15, 2023
4b1efe7
updates per mark and chris
hhunter-ms May 16, 2023
d45d120
Merge branch 'issue_3316' of https://github.com/hhunter-ms/docs into …
hhunter-ms May 16, 2023
9fa7fca
Merge branch 'v1.11' into issue_3316
msfussell May 16, 2023
00e10a0
few more edits per mark
hhunter-ms May 17, 2023
4aea5c7
Merge branch 'issue_3316' of https://github.com/hhunter-ms/docs into …
hhunter-ms May 17, 2023
0a3ffde
Merge branch 'v1.11' into issue_3316
hhunter-ms May 17, 2023
49c74e2
Merge branch 'v1.11' into issue_3316
msfussell May 17, 2023
d1276c5
Merge branch 'v1.11' into issue_3316
hhunter-ms May 17, 2023
6c9749c
Merge branch 'v1.11' into issue_3316
hhunter-ms May 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,29 @@ To terminate your workflow with an ID `12345678`, run:
POST http://localhost:3500/v1.0-alpha1/workflows/dapr/12345678/terminate
```

### Pause or resume a workflow
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

To plan for down-time, wait for inputs, and more, you can pause and then resume a workflow. To stop a workflow with an ID `12345678` until triggered to resume, run:
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

```bash
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved
POST http://localhost:3500/v1.0-alpha1/workflows/dapr/12345678/pause
```

To resume a workflow with an ID `12345678`, run:

```bash
POST http://localhost:3500/v1.0-alpha1/workflows/dapr/12345678/resume
```


### Purge a workflow

To remove actor state from your state store and avoid overloading your state stores, run:
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

```bash
POST http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/purge
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved
```

hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved
### Get information about a workflow

To fetch workflow information (outputs and inputs) with an ID `12345678`, run:
Expand Down
106 changes: 106 additions & 0 deletions daprdocs/content/en/reference/api/workflow_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,112 @@ Traceparent: 00-e3dedffedbeb9efbde9fbed3f8e2d8-5f38960d43d24e98-01
Connection: close 
```

## Pause workflow request
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

Pause a running workflow instance with the given name and instance ID.
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

```bash
POST http://localhost:3500/v1.0-alpha1/workflows/<workflowComponentName>/<instanceId>/pause
```

### URL parameters

Parameter | Description
--------- | -----------
`workflowComponentName` | Current default is `dapr` for Dapr Workflows
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved
`instanceId` | Unique value created for each run of a specific workflow

### HTTP response codes

Code | Description
---- | -----------
`202` | Accepted
`400` | Request was malformed
`500` | Request formatted correctly, error in dapr code or underlying component
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

### Response content

The API call will provide a response similar to this:

```bash
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved
HTTP/1.1 202 Accepted
Server: fasthttp
Date: Thu, 12 Jan 2023 21:31:16 GMT
Traceparent: 00-e3dedffedbeb9efbde9fbed3f8e2d8-5f38960d43d24e98-01
Connection: close 
```

## Resume workflow request

Resume a paused workflow instance with the given name and instance ID.

```bash
POST http://localhost:3500/v1.0-alpha1/workflows/<workflowComponentName>/<instanceId>/resume
```

### URL parameters

Parameter | Description
--------- | -----------
`workflowComponentName` | Current default is `dapr` for Dapr Workflows
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved
`instanceId` | Unique value created for each run of a specific workflow

### HTTP response codes

Code | Description
---- | -----------
`202` | Accepted
`400` | Request was malformed
`500` | Request formatted correctly, error in dapr code or underlying component
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

### Response content

The API call will provide a response similar to this:

```bash
HTTP/1.1 202 Accepted
Server: fasthttp
Date: Thu, 12 Jan 2023 21:31:16 GMT
Traceparent: 00-e3dedffedbeb9efbde9fbed3f8e2d8-5f38960d43d24e98-01
Connection: close 
```

## Purge workflow request

Purge a running workflow instance with the given name and instance ID.

```bash
POST http://localhost:3500/v1.0-alpha1/workflows/<workflowComponentName>/<instanceId>/purge
```

### URL parameters

Parameter | Description
--------- | -----------
`workflowComponentName` | Current default is `dapr` for Dapr Workflows
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved
`workflowName` | Identify the workflow type
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved
`instanceId` | Unique value created for each run of a specific workflow

### HTTP response codes

Code | Description
---- | -----------
`202` | Accepted
`400` | Request was malformed
`500` | Request formatted correctly, error in dapr code or underlying component
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

### Response content

The API call will provide a response similar to this:

```bash
HTTP/1.1 202 Accepted
Server: fasthttp
Date: Thu, 12 Jan 2023 21:31:16 GMT
Traceparent: 00-e3dedffedbeb9efbde9fbed3f8e2d8-5f38960d43d24e98-01
Connection: close 
```

### Get workflow request
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

Get information about a given workflow instance.
Expand Down