Re: [openstack-dev] [mistral][yaql] Addressing task result using YAQL function

2015-09-08 Thread ELISHA, Moshe (Moshe)
questions) Subject: Re: [openstack-dev] [mistral][yaql] Addressing task result using YAQL function > On 07 Sep 2015, at 19:18, Stan Lagun <sla...@mirantis.com> wrote: > > I believe this is a good change. $.task_name requires you that $ be > pointing to a tasks dictionary.

Re: [openstack-dev] [mistral][yaql] Addressing task result using YAQL function

2015-09-07 Thread Stan Lagun
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 you can write [1, 2, 3].select($ + task(taskName)). However the name "task" looks

Re: [openstack-dev] [mistral][yaql] Addressing task result using YAQL function

2015-09-07 Thread Renat Akhmerov
> On 07 Sep 2015, at 19:18, Stan Lagun wrote: > > 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 > you

Re: [openstack-dev] [mistral][yaql] Addressing task result using YAQL function

2015-09-05 Thread Dmitri Zimine
Yes meant to ask for consistency of referencing to task results. So it’s task(task_name) regardless of where. 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

Re: [openstack-dev] [mistral][yaql] Addressing task result using YAQL function

2015-09-03 Thread Renat Akhmerov
> On 02 Sep 2015, at 21:01, Dmitri Zimine wrote: > > Agree, > > with one detail: make it explicit - task(task_name). So do you suggest we just replace res() with task() and it looks like task() - get task result when we are in “publish” task(task_name) - get task

Re: [openstack-dev] [mistral][yaql] Addressing task result using YAQL function

2015-09-02 Thread Nikolay Makhotkin
; > Begin forwarded message: > > *From: *Renat Akhmerov <rakhme...@mirantis.com> > *Subject: **[openstack-dev][mistral][yaql] Addressing task result using > YAQL function* > *Date: *2 Sep 2015 17:16:27 GMT+6 > *To: *"OpenStack Development Mailing List (not for usage questio

[openstack-dev] [mistral][yaql] Addressing task result using YAQL function

2015-09-02 Thread Renat Akhmerov
Hi, I’d like to propose a few changes after transition to yaql 1.0: We already moved from using “$.__execution” in DSL to "execution()” and from “$.__env” to “env()” where “execution()” and “env()" are registered yaql functions. We had to do it because double underscored are prohibited in the

Re: [openstack-dev] [mistral][yaql] Addressing task result using YAQL function

2015-09-02 Thread Dmitri Zimine
Agree, with one detail: make it explicit - task(task_name). 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. And full result is being thought as the