Page 1 of 1
Flows as Procedure Calls
Posted: 18 Nov 2013 21:24
by squan
Hi,
I want to reuse flows as procedures (subroutines) for common tasks.
I.e. these flows are called by top level flows, take input in variables and return results in variables.
My problem is that each flow must have a trigger, which is not adequate for flows when used as a procedure. These procedures should just run unconditionally when and only when called by a flow.
Flows representing a procedure are not meant to be triggered as a top level flow.
How can I do that??
Re: Flows as Procedure Calls
Posted: 18 Nov 2013 23:15
by Martin!
Just leave the trigger empty. While each flow does need a trigger box as a starting point, you don't need to assign any triggers to it.
Re: Flows as Procedure Calls
Posted: 19 Nov 2013 05:46
by squan
Martin! wrote:Just leave the trigger empty. While each flow does need a trigger box as a starting point, you don't need to assign any triggers to it.
Glad to here that using flows as subroutines should be possible.
But how do I make a trigger "empty"?
I created my procedure flow by factoring out from the main flow (i.e. by flow copying).
So there already is a trigger but there seems no way to make it empty.
The UI offers only lists with radio boxes with no possibility to deselect.
Also context and online help do not mention such thing like an empty trigger.
If the Automagic guys read this, please make such things more obvious.
Any hint on how to make a trigger empty?
Re: Flows as Procedure Calls
Posted: 19 Nov 2013 14:32
by 98b427af
squan wrote:Any hint on how to make a trigger empty?
I created a Global Variable trigger that uses an invalid global variable name. Every time I want an "empty" trigger, I just use that. See
.
Re: Flows as Procedure Calls
Posted: 19 Nov 2013 14:53
by pat2net
Click on the top of the trigger and then you can unselect the trigger. Also when you create a new flow, just leave the trigger box empty and click on the plus to link an action or a condition.
Re: Flows as Procedure Calls
Posted: 19 Nov 2013 16:26
by squan
pat2net wrote:Click on the top of the trigger and then you can unselect the trigger.
Thanks, that's it!
Somehow I missed the difference that this list shows checkboxes (also allowing for more then one trigger) in contrast to the list i get when clicking the edit symbol to the left of tthe trigger box (for modifying one of the selected triggers).
Re: Flows as Procedure Calls
Posted: 19 Nov 2013 22:07
by 98b427af
Note that if you want to name the trigger, you'll need to use a method similar to the one I posted. A completely blank trigger can't be edited. A trigger like mine will never be executed, so its contents don't matter.