Was flow called from another flow?

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
jassing
Posts: 94
Joined: 16 Jul 2017 01:42
Location: SF Bay Area

Was flow called from another flow?

Post by jassing » 25 Nov 2019 05:59

Is there a way to tell if a flow was called by another flow?

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

Re: Was flow called from another flow?

Post by Desmanto » 25 Nov 2019 17:28

One way to know it is the trigger is not the same as the flow being called. If you have
Flow A : trigger B
Flow C : trigger D
When you use Flow A triggered by trigger B to call Flow C, the variable {trigger} still point to trigger B. But the flow name now changed to Flow C.

The other way is to log the flow name first to some glovar before calling other flow. So when the called flow check the glovar and find something, it knows it was called by other flow. The similar question and solution are here : viewtopic.php?f=4&t=7011
Make a mapping between the caller flow and called flow and track between them. It is complicated though.

If I can know what you want to achieve, maybe I can suggest a better/easier alternative.
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.

Post Reply