<div dir="ltr">I believe this is a good change. $.task_name requires you that $ be pointing to a tasks dictionary. But in the middle of the query like [1.2.3].select($ + 1) "$" will change its value. With a function approach<div>you can write [1, 2, 3].select($ + task(taskName)). However the name "task" looks confusing as to my understanding tasks may have attributes other than result. It may make sense to use task(taskName).result instead.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="font-family:arial;font-size:small">Sincerely yours,<br>Stan Lagun<br>Principal Software Engineer @ Mirantis</span></span><br><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="font-family:arial;font-size:small"><br><a href="mailto:slagun@mirantis.com" target="_blank"></a></span></span></div></div></div>
<br><div class="gmail_quote">On Sun, Sep 6, 2015 at 12:14 AM, Dmitri Zimine <span dir="ltr"><<a href="mailto:dzimine@stackstorm.com" target="_blank">dzimine@stackstorm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Yes meant to ask for consistency of referencing to task results. So it’s task(task_name) regardless of where. <div><br></div><div>One use case in favor of this is tooling: I refactor workflow with an automated tool which wants to automatically rename the task name EVERYWHERE. You guys know well by now that renaming the task is a source of too many frustrating errors :)</div><div><br></div><div>What other think? </div><span class="HOEnZb"><font color="#888888"><div><br></div><div>DZ. </div></font></span><div><br><div><div><div class="h5"><div>On Sep 3, 2015, at 4:23 AM, Renat Akhmerov <<a href="mailto:rakhmerov@mirantis.com" target="_blank">rakhmerov@mirantis.com</a>> wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5"><div style="word-wrap:break-word"><div><br></div><div><blockquote type="cite"><div>On 02 Sep 2015, at 21:01, Dmitri Zimine <<a href="mailto:dzimine@stackstorm.com" target="_blank">dzimine@stackstorm.com</a>> wrote:</div><br><div><div style="word-wrap:break-word">Agree, <div><br></div><div>with one detail: make it explicit - task(task_name). </div></div></div></blockquote><div><br></div><div>So do you suggest we just replace res() with task() and it looks like</div><div><br></div><div>task() - get task result when we are in “publish”</div><div>task(task_name) - get task result from anywhere</div><div><br></div><div>?</div><div><br></div><div>Is that correct you mean we must always specify a task name? The reason I’d like to have a simplified form (w/o task name) is that I see a lot of workflows that we have to repeat task name in publish so that it just look too verbose to me. Especially in case of very long task name.</div><div><br></div><div>Consider something like this:</div><div><br></div><div>tasks:</div><div><div> <b>get_volumes_by_names</b>:</div><div> with-items: name in <% $.vol_names %></div><div> workflow: get_volume_by_name name=<% $.name %></div><div> publish:</div><div> volumes: <% $.<b>get_volumes_by_names</b> %></div><div><br></div><div>So in publish we have to repeat a task name, there’s no other way now. I’d like to soften this requirement, but if you still want to use task names you’ll be able to.</div><div><br></div></div><br><blockquote type="cite"><div><div style="word-wrap:break-word"><div>res - we often see folks confused by result of what (action, task, workflow) although we cleaned up our lingo: action-output, task-result, workflow-output…. but still worth being explicit.</div><div><br></div><div>And full result is being thought as the root context $.</div><div><br></div><div>Publishing to global context may be ok for now, IMO.</div></div></div></blockquote></div><br><div>Not sure what you meant by "Publishing to global context”. Can you clarify please?</div><div><br></div><div><br></div><div><div>Renat Akhmerov</div><div>@ Mirantis Inc.</div></div><div><br></div></div></div></div><span class="">__________________________________________________________________________<br>OpenStack Development Mailing List (not for usage questions)<br>Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org" target="_blank">OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe<br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br></span></blockquote></div><br></div></div><br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>