Good afternoon again.
Which is the best wsy to let a flow start only when another flow or bunch of finishes?
I have a text into the clipboard and have to decide where to share or save it through an input dialog, multi-choice.
I can choose, say, three items, that means i would like to share that text to 3 different destinations (say whatsapp, facebook, save to disk).
To perform every share/save I call a flow each.
The matter is that the flow cannot run cuncurrently for the use control UI, so the should run one after each other.
Best way to do that, if any?
Thank you.
wait until flow(s) finish(es)
Moderator: Martin
- tsolignani
- Posts: 187
- Joined: 12 Jan 2019 11:53
- Location: Vignola, Mo, Italy
- Contact:
Re: wait until flow(s) finish(es)
If all of the flow which execute certain CUI task must be perfomed in series (one at a time), then you can use looped execute flows to do it. Tick wait for the called flows to finish. This way, even if you have 10 app with CUI, you can perform them one by one. You have several way to do this actually.
1. You can put each app + CUI in separate flow. From the multiple dialog, loop thru {value} index and execute each flow name one by one. This takes up as many flows as you need for the app, +1 for the clipboard flow.
2. Put all app + CUI in a single flow separated by expression. The expression check for the value that is currently loop. So the execute flow execute the same flow, but with different {command} variable you pass to it. This takes only 2 flows, 1 clipboard flow, and another flow to hold all the separated command app + CUI.
3. Put all app + CUI in the same flow with the clipboard flow. You don't need execute flow, but instead put all the separated expression in the same flow. After each branch of App + CUI, loop back to the same loop control for after the multiple expression. This require only single flow, one to rule them all!
Depends on how many your App + CUI pair, I would recommend the 2nd option, 1 clipboard flow and 1 combined App + CUI flow. This will make your flow much tidy and you can reuse the App + CUI flow from another flow (by using execute flow too).
1. You can put each app + CUI in separate flow. From the multiple dialog, loop thru {value} index and execute each flow name one by one. This takes up as many flows as you need for the app, +1 for the clipboard flow.
2. Put all app + CUI in a single flow separated by expression. The expression check for the value that is currently loop. So the execute flow execute the same flow, but with different {command} variable you pass to it. This takes only 2 flows, 1 clipboard flow, and another flow to hold all the separated command app + CUI.
3. Put all app + CUI in the same flow with the clipboard flow. You don't need execute flow, but instead put all the separated expression in the same flow. After each branch of App + CUI, loop back to the same loop control for after the multiple expression. This require only single flow, one to rule them all!
Depends on how many your App + CUI pair, I would recommend the 2nd option, 1 clipboard flow and 1 combined App + CUI flow. This will make your flow much tidy and you can reuse the App + CUI flow from another flow (by using execute flow too).
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
- tsolignani
- Posts: 187
- Joined: 12 Jan 2019 11:53
- Location: Vignola, Mo, Italy
- Contact:
Re: wait until flow(s) finish(es)
It took me a while to understand and another bit to implement it, but it worked and now I learned something new which will be useful again.
Thank you.
Thank you.