Put flows into one

Post your questions and help other users.

Moderator: Martin

Post Reply
JayJayX
Posts: 6
Joined: 12 Dec 2016 22:10

Put flows into one

Post by JayJayX » 27 Jan 2019 10:27

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

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Put flows into one

Post by Desmanto » 27 Jan 2019 11:40

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

JayJayX
Posts: 6
Joined: 12 Dec 2016 22:10

Re: Put flows into one

Post by JayJayX » 27 Jan 2019 18:00

Hi Desmanto,

works like I expected.

Thank you very much...
JayJay

Post Reply