Flow as a Function with Parameters Passing

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
kakharin
Posts: 13
Joined: 09 Jan 2013 10:35

Flow as a Function with Parameters Passing

Post by kakharin » 22 Jan 2013 14:42

Now, I wrote many flows for doing the same things with different values. I'm using some global variables to change the value of each execution in the flow. But there are some limits, e.g. global variable may be overwrite by different flows. It will be better if Automagic can treat any flows as functions with parameter passing in and out. And it will be better if it can be controlled to be a single instant of calling function, or creating a new instant for each function calling, in select-able way. Is it possible to have this great feature?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Flow as a Function with Parameters Passing

Post by Martin » 22 Jan 2013 16:49

Action "Execute Flows" passes flow-local variables to the called flow(s). I will check if I can extend the action "Execute Flows" to pass the variables of the called flows back to the calling flow (would only be available when option "Wait for called flows to finish" is checked). An option to wait with the execution of a flow until the last execution has finished should also be possible but I have to think about the implications of such a feature (especially deadlocks).

Locked