Commit 266d282
committed
Adds
```
Workflow management commands. Use -k to target a Kubernetes Dapr cluster.
Usage:
dapr workflow [command]
Aliases:
workflow, work
Available Commands:
history Get the history of a workflow instance.
list List workflows for the given app ID.
purge Purge one or more workflow instances with a terminal state. Accepts a workflow instance ID argument or flags to purge multiple/all terminal instances.
raise-event Raise an event for a workflow waiting for an external event. Expects a single argument '<instance-id>/<event-name>'.
rerun ReRun a workflow instance from the beginning or a specific event. Optionally, a new instance ID and input to the starting event can be provided.
resume Resume a workflow that is suspended.
run Run a workflow instance based on a given workflow name. Accepts a single argument, the workflow name.
suspend Suspend a workflow in progress.
terminate Terminate a workflow in progress.
Flags:
-a, --app-id string The app ID owner of the workflow instance
-h, --help help for workflow
-k, --kubernetes Target a Kubernetes dapr installation
-n, --namespace string Namespace to perform workflow operation on (default "default")
Global Flags:
--log-as-json Log output in JSON format
--runtime-path string The path to the dapr runtime installation directory
Get the history of a workflow instance.
Usage:
dapr workflow history [flags]
Flags:
-h, --help help for history
-o, --output string Output format. One of short, wide, yaml, json (default "short")
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
List workflows for the given app ID.
Usage:
dapr workflow list [flags]
Aliases:
list, ls
Flags:
-c, --connection-string string The connection string used to connect and authenticate to the actor state store
-m, --filter-max-age string Filter only the workflows started within the given duration or timestamp. Examples: 300ms, 1.5h or 2h45m, 2023-01-02T15:04:05 or 2023-01-02
-w, --filter-name string Filter only the workflows with the given name
-s, --filter-status string Filter only the workflows with the given runtime status. One of RUNNING, COMPLETED, CONTINUED_AS_NEW, FAILED, CANCELED, TERMINATED, PENDING, SUSPENDED
-h, --help help for list
-o, --output string Output format. One of short, wide, yaml, json (default "short")
-t, --table-name string The name of the table or collection which is used as the actor state store
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
Purge one or more workflow instances with a terminal state. Accepts a workflow instance ID argument or flags to purge multiple/all terminal instances.
Usage:
dapr workflow purge [flags]
Flags:
--all Purge all workflow instances in a terminal state. Use with caution.
--all-older-than string Purge workflow instances older than the specified Go duration or timestamp, e.g., '24h' or '2023-01-02T15:04:05Z'.
-c, --connection-string string The connection string used to connect and authenticate to the actor state store
-h, --help help for purge
-t, --table-name string The name of the table or collection which is used as the actor state store
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
Raise an event for a workflow waiting for an external event. Expects a single argument '<instance-id>/<event-name>'.
Usage:
dapr workflow raise-event [flags]
Flags:
-h, --help help for raise-event
-x, --input string Optional input data for the new workflow instance. Accepts a JSON string.
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
ReRun a workflow instance from the beginning or a specific event. Optionally, a new instance ID and input to the starting event can be provided.
Usage:
dapr workflow rerun [instance ID] [flags]
Flags:
-e, --event-id uint32 The event ID from which to re-run the workflow. If not provided, the workflow will re-run from the beginning.
-h, --help help for rerun
-x, --input string Optional input data for the new workflow instance. Accepts a JSON string.
--new-instance-id string Optional new ID for the re-run workflow instance. If not provided, a new ID will be generated.
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
Resume a workflow that is suspended.
Usage:
dapr workflow resume [flags]
Flags:
-h, --help help for resume
-r, --reason string Reason for resuming the workflow
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
Run a workflow instance based on a given workflow name. Accepts a single argument, the workflow name.
Usage:
dapr workflow run [flags]
Flags:
-h, --help help for run
-x, --input string Optional input data for the new workflow instance. Accepts a JSON string.
-i, --instance-id string The target workflow instance ID.
-s, --start-time string Optional start time for the workflow in RFC3339 or Go duration string format. If not provided, the workflow starts immediately. A duration of '0s', or any start time, will cause the command to not wait for the command to start
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
Suspend a workflow in progress.
Usage:
dapr workflow suspend [flags]
Flags:
-h, --help help for suspend
-r, --reason string Reason for resuming the workflow
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
Terminate a workflow in progress.
Usage:
dapr workflow terminate [flags]
Flags:
-h, --help help for terminate
-o, --output string Optional output data for the workflow in JSON string format.
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
```
Signed-off-by: joshvanl <[email protected]>dapr workflow
1 parent de38192 commit 266d282
File tree
35 files changed
+3988
-50
lines changed- cmd
- workflow
- pkg
- kubernetes
- standalone
- workflow
- db
- dclient
- tests
- apps/workflow
- e2e
- standalone
- testdata/run-template-files
- utils
35 files changed
+3988
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| 115 | + | |
114 | 116 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
0 commit comments