Add an endpoint to track action/workflow executions belong to a certain task

Registered by Renat Akhmerov

We currently dont' have any support for tracking parent-child relationship between workflows. From DB model perspective there's the field "task_execution_id" for all executions (actions, workflows) that expresses this relationship. This field is also present in REST resources that we can get using /executions endpoint (to get workflow executions). This help us answer the question "What task do this workflow execution belong to?" (=> "What workflow does this workflow execution belong to?" or simply "What is the parent workflow execution of this workflow execution?".

However, practically we also need to be able to answer the question "What are the child workflow executions of this task execution?". It's needed to build a convenient UI (e.g. we see a task and would like to expand a tree associated with this task) and CLI commands.

Proposed solution:

* Add a new endpoint that would allow us to get all child executions of the given task execution


The result would be a list of objects of two possible types: 1) workflow executions (similar to /executions) in case if the task is configured to run workflow 2) action executions (similar to /action_executions) in case if the task is configured to run actions

* Modify /v2/tasks endpoint so that objects returned by it also include field "task_type" with two possible values: action, workflow. That would allow to know what type of objects to expect from new endpoint /tasks/<id>/executions

Blueprint information

Renat Akhmerov
Renat Akhmerov
Michal Gershenzon
Series goal:
Accepted for ocata
Milestone target:
milestone icon ocata-1
Started by
Renat Akhmerov
Completed by
Renat Akhmerov

Related branches



Gerrit topic:,topic:bp/mistral-task-subexecutions-endpoint,n,z

Addressed by:
    WIP: moving REST resources to

Addressed by:
    Move the remainder of REST resources to

Addressed by:
    Add the new endpoint /v2/tasks/<id>/workflow_executions

renat: May be we even don't need this shortcut /executions endpoint but instead just add something like 'task_type' (action | workflow) into task itself so that on the client side we knew what exact subendpoint to call

Addressed by:
    Add type to tasks API


Work Items

This blueprint contains Public information 
Everyone can see this information.