Dynamic actions

Registered by Renat Akhmerov

Currently when designing a workflow we have to specify names of actions and workflows called by tasks statically like:

task1:
  action: std.http url=...

We can change this to be able to use expressions (YAQL or Jinja) to evaluate action/workflow name and its parameters. Parameters is also an important part because it won't be much useful to have exactly same parameter set for many actions that we want to use interchangeably.

------ Example 1 ------

tasks:
  taskA:
      action: my_action
      publish:
          next_action_name: actionA

  taskB:
      action: <% $.next_action_name %> param1=<% ... %> ...

------ Example 2 ------

tasks:
  taskA:
      action: my_action
      publish:
          next_action_name: actionA
          next_action_params: paramA

  taskB:
      action: <% $.next_action_name %>
      input: <% $.next_action_params %>

Notes:

* It makes sense to support example 2, then example 1 just becomes a special case. Otherwise it can address only limited use cases because in general case actions may take different parameters.

Blueprint information

Status:
Complete
Approver:
Renat Akhmerov
Priority:
Medium
Drafter:
Renat Akhmerov
Direction:
Approved
Assignee:
Istvan Imre
Definition:
Approved
Series goal:
Accepted for queens
Implementation:
Implemented
Milestone target:
milestone icon queens-1
Started by
Renat Akhmerov
Completed by
Renat Akhmerov

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/mistral-dynamic-actions,n,z

Addressed by: https://review.openstack.org/434106
    Dynamic workflow name evaluation.

Addressed by: https://review.openstack.org/508501
    Dynamic task name evaluation.

Addressed by: https://review.openstack.org/511742
    Dynamic workflow name evaluation.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.