Page 1 of 1

Put flows into one

Posted: 27 Jan 2019 10:27
by JayJayX
Hi,

i have a little problem to use different triggers in one flow. At the moment I use many flows with one trigger like this:

Http Request
/automagic/spritpreis1

Action
Script
global_spritpreis1 = {param_spritpreis1}

That works if I use a flow for each trigger, but I want it in one trigger. If I do this, I get it the other Variables "null".
It was not possible for me to find the right condition. Could someone help me with this?

global_spritpreis1 is needed for an output in a widget


best regards
JayJay

Re: Put flows into one

Posted: 27 Jan 2019 11:40
by Desmanto
Does all your flow use the same path /automagic/spritpreis1? Means you have the post from other devices, posting different parameter to the same path?
There is a way to check if the param_spritpreis1 is available or not, by searching it in getVariableNames(). But it seems not efficient to do it this way.

At mine, I would assign each command with different naming for the path and then check the request_path. My Trigger use the path /automagic/* then I put multiple parallel expression to branch according to the request_path. viewtopic.php?f=5&t=6882

Each expression check for something like this.

Code: Select all

request_path == "/automagic/openurl"
After that, each branch will do its job, using the defined parameter from its branch. It won't mis-assign the param from other branch.

Re: Put flows into one

Posted: 27 Jan 2019 18:00
by JayJayX
Hi Desmanto,

works like I expected.

Thank you very much...
JayJay