Workflow Execution Graph

Registered by Winson Chan on 2016-04-27

On invocation of a workflow execution, the workflow definition is translated and expanded into an execution graph. Tasks is represented as nodes and the transition (i.e. on-success, on-error, etc.) between tasks as edges with YAQL expression in the graph. The workflow engine will use the execution graph at runtime to determine which set of task(s) to run. The graph will store task states and will mark the edges that have been evaluated.

There are a number of problems that the execution graph will solve.
1) Minimize the number of database queries that the engine has to make to determine the next set of tasks. Thus reduce the DB transaction time and minimizing the risk of deadlocking.
2) Able to address a workflow use case which current implementation cannot do accurately (i.e. where a non join task is referenced by multiple tasks) .
3) Add an API endpoint to get the execution graph for visualization in the UI. This will minimize the number of DB queries required to get the same set of information if this graph isn't available.

Blueprint information

Status:
Started
Approver:
Renat Akhmerov
Priority:
High
Drafter:
Winson Chan
Direction:
Approved
Assignee:
Winson Chan
Definition:
Discussion
Series goal:
None
Implementation:
Blocked
Milestone target:
None
Started by
Renat Akhmerov on 2016-07-28

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/mistral-workflow-execution-graph,n,z

Addressed by: https://review.openstack.org/348612
    Implements WorkflowGraph for graphing tasks and transitions

Addressed by: https://review.openstack.org/348613
    Add utility functions in workflow spec for graphing

Addressed by: https://review.openstack.org/348614
    Implement workflow composers

Addressed by: https://review.openstack.org/349695
    Add sample workflow conductor to test task sequences

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.