variables/flows binding

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
automate
Posts: 5
Joined: 27 Jun 2014 13:22

variables/flows binding

Post by automate » 03 Jul 2014 10:52

hi all.

i have 2 flows named Flow A and Flow B and i set, somewhere else, a global string variable named global_flow that can be "A" or "B" (let's say this is a sort of next state).
then, in a third flow, i evaluate global_flow and execute Flow A is the variable holds "A" and Flow B if it holds "B".

at the moment i created 2 condition/action couples but... is there a better way to do this?
i mean, if i have n flows, do i have to create n condition/action couples? :shock:

thanks a lot.

ZSasha
Posts: 103
Joined: 11 Oct 2013 03:48

Re: variables/flows binding

Post by ZSasha » 03 Jul 2014 23:03

the command "execute a flow" accepts variable with a flow name. So you can call "execute flow {global_flowname}" and it will call the flow name you passed as a parameter.

Regards.

automate
Posts: 5
Joined: 27 Jun 2014 13:22

Re: variables/flows binding

Post by automate » 04 Jul 2014 07:57

excetly what i need, thanks! ;)

Post Reply