Add workflow state tracking into CLI commands
When we run a command like:
$ mistral execution-create my_workflow input.json
It would be useful to be able to add a key that makes this command track the state of the workflow. For example:
$ mistral execution-create my_workflow input.json --track-state
+------
| Field | Value |
+------
| ID | 04c8408a-
| Workflow ID | b053dcc8-
| Workflow name | with_items_2000 |
| Workflow namespace | |
| Description | |
| Task Execution ID | <none> |
| Root Execution ID | <none> |
| State | RUNNING |
| State info | None |
| Created at | 2020-05-18 06:19:59 |
| Updated at | 2020-05-18 06:19:59 |
| Duration | 0:00:13... |
+------
Still running after 20 seconds..
Still running after 30 seconds..
Still running after 40 seconds..
....
....
Workflow completed:
+------
| Field | Value |
+------
| ID | 04c8408a-
| Workflow ID | b053dcc8-
| Workflow name | with_items_2000 |
| Workflow namespace | |
| Description | |
| Task Execution ID | <none> |
| Root Execution ID | <none> |
| State | SUCCESS |
| State info | None |
| Created at | 2020-05-18 06:19:59 |
| Updated at | 2020-05-18 06:19:59 |
| Duration | 0:00:53 |
+------
This is just an example of the output. In the final version of the patch we may come up with better ideas.
Also, this tracking functionality can be implemented either as a new command (e.g. $ mistral execution-
The same tracking function can be made for task and action executions.
Blueprint information
- Status:
- Not started
- Approver:
- Renat Akhmerov
- Priority:
- Medium
- Drafter:
- Renat Akhmerov
- Direction:
- Approved
- Assignee:
- ali abdelal
- Definition:
- Approved
- Series goal:
- Accepted for victoria
- Implementation:
- Not started
- Milestone target:
- wallaby-1
- Started by
- Completed by