merge mistral tasks data to execution context

Registered by Vasudeo Nimbekar

Currently, mistral replaces task data in execution context.
With a merge strategy config, mistral can have option to replace or merge a task data to execution context.

For Ex:
workflow:
"""
        version: '2.0'
        wf:
          input:
            - aa:
                bb: wf_ex_input
                cc: wf_ex_input
                zz: wf_ex_input
          output:
            aa: <% $.aa %>
          tasks:
            task1:
              action: std.echo
              # emulate some action result
              input:
                output:
                  cc: task1_res
                  dd: task1_res
              on-success: [task2]
              publish:
                aa:
                  cc: <% task().result["cc"] %>
                  dd: <% task().result["dd"] %>
            task2:
              action: std.echo
              # emulate some action result
              input:
                output:
                  bb: task2_res
              publish:
                aa:
                  bb: <% task().result["bb"] %>
        """

merge strategy: replace(current behaviour)
workflow_op:
{
    "aa": {
                "bb": "task2_res"
            }
}

merge strategy: merge
workflow_op:
{
            "aa": {
                "bb": "task2_res",
                "cc": "task1_res",
                "dd": "task1_res",
                "zz": "wf_ex_input"
            }
}

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Vasudeo Nimbekar
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.opendev.org/#/q/topic:bp/merge-mistral-tasks-data

Addressed by: https://review.opendev.org/c/openstack/mistral/+/868739
    Merge mistral tasks data to execution context

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.