[openstack-dev] [Mistral] Access to worklfow/task results without implicit publish
dzimine at stackstorm.com
Tue Dec 23 01:26:06 UTC 2014
Refer to workflow / action output without explicitly re-publishing the output values. Why we want it: to reduce repetition, and to make modifications in the place values are used, not where they are obtained (and not in multiple places). E.g., as an editor of a workflow, when I just realized that I need a value of some task down the line, I want to make change right here in the tasks that consumes the data (and only those which need this data), without finding and modifying the task that supplies the data.
We don't have a concept of workflow or action ‘results': it's the task which produces and publishes results. Different tasks call same actions/workflows, produce same output variables with diff values. We don't want to publish this output with output name as a key, to the global context: they will conflict and mess up. Instead, we can namespace them by the task (as specific values are the attributes of the tasks, and we want to refer to tasks, not actions/workflows).
To refer the output of a particular task (aka raw result of action execution invoked by this task), use the_task prefix:
- foo # << declare output here
foo: $foo # << define output in a task
# Today, you must explicitly publish to make data
# from action available for other tasks
foo: $foo # << re-plublish, else you can't use it
action: echo output="$foo and $bar" # << use it from task t1
action: echo output="$_task.t1.foo and $_task.t1.bar"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev