Engine instructions (pause, fail, succeed, rollback)
We need to be able to specify special engine instructions under clauses 'on-error', 'on-success', 'on-complete' to perform a predefined set of commands:
* pause - To pause workflow execution
* fail - Immediately finish workflow execution with a failure
* succeed - Immediately complete workflow execution with success
* rollback - Rollback workflow
Example:
taskA:
action: my.action
on-success:
- taskB: $.my_val = 10 # Here we start two other tasks as usually (fork)
- taskC: $.my_val = 5
on-error:
- pause: $.my_val = 20 # Here we use a special engine instruction on-condition
For both tasks and instructions conditions are optional.
We also need to be able to define the same clauses (with a little bit different names for clarity such as 'on-task-error', 'on-task-success', 'on-task-complete') at workflow level to specify, for example, error handler for all task in one place. Corresponding clause specified for individual task takes precedence.
Blueprint information
- Status:
- Complete
- Approver:
- Renat Akhmerov
- Priority:
- Medium
- Drafter:
- Renat Akhmerov
- Direction:
- Needs approval
- Assignee:
- Renat Akhmerov
- Definition:
- New
- Series goal:
- Accepted for juno
- Implementation:
-
Implemented
- Milestone target:
-
0.1
- Started by
- Renat Akhmerov
- Completed by
- Renat Akhmerov
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Fixing task v2 specification
Addressed by: https:/
Adding unit for tests engine instructions
Addressed by: https:/
Renaming 'stop_workflow' to 'pause_workflow'
Addressed by: https:/
Refactoring engine using abstraction of command
Addressed by: https:/
Fixing workflow handlers to return fail|succeed|
Addressed by: https:/
Fixing workflow specification to support 'on-task-XXX' clauses
Addressed by: https:/
Implementing workflow 'on-task-XXX' clauses
Work Items
Dependency tree

* Blueprints in grey have been implemented.