Use published variables in 'publish'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Fix Released
|
High
|
Renat Akhmerov |
Bug Description
task1:
action: foo
publish:
foo: "foo"
task2:
action: bar foo={$foo} # assume it has output.bar
publish:
foobar: $.foo + $.bar
As a user, want to
1) use workflow input or previously published variables when publishing
2) mix them with the output of task action
The problem is what is the root that $ points in YAQL.
If it points to task output, than referencing them via something like $.__vars.foo
- but it sucks because it's inconsistent with the way we reference them in action input.
if it points to context, than user needs to refer $.__self.bar
if we merge the dictionaries
Proposal:
merge the dictionaries; local (task action) overrides the global (workflow input, or published), AND be able to explicitly reference by $.__self.bar, $__task.task2.bar and $.__global.foo
Changed in mistral: | |
importance: | Undecided → High |
status: | New → Confirmed |
milestone: | none → kilo-2 |
Changed in mistral: | |
assignee: | nobody → Renat Akhmerov (rakhmerov) |
Changed in mistral: | |
status: | In Progress → Fix Committed |
Changed in mistral: | |
status: | Fix Committed → Fix Released |
Changed in mistral: | |
milestone: | kilo-2 → 2015.1 |
Hm... I guess I didn't fully understand the proposal. What's "__global" and what's "__self"?
How about just being able to access action output in "publish" via something like "$.__res" whereas "$" will point to workflow context as in other cases? This key "__res" could be just temporarily available only within "publish" scope.
Need to think about options for variable name itself though. My options: "__res", "__action", "__raw_result", "__raw".