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

2015-09-07 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 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 li

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 can write [1, 2, 3].sel

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 confus

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 renami

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 result from anywhere ? I

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 ro

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

2015-09-02 Thread Nikolay Makhotkin
t; > *From: *Renat Akhmerov > *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 questions)" < > openstack-dev@lists.openstack.org> >

[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 n