Non existing flows references cleanup

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
xdauser
Posts: 35
Joined: 05 Aug 2015 17:55

Non existing flows references cleanup

Post by xdauser » 06 Mar 2018 11:55

Good Day Martin,

I believe nobody requested this before.

Problem: Many times I delete certain flows which I believe are obsolete or not necessary anymore in Automagic.

Effect: Flows which are calling non existing flows (deleted flows) are halted and ended with errors which is off course normal behaviour

Solution: Implement feature - If any flow is deleted from Automagic any references to it in other flows like enable/disable/execute etc. are removed from flows as well.

Sort of feature similar to flow renaming behavior. If you rename flow all instances of this flow are renamed in other flows.
That would be great addition. Thanks in an advance.

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

Re: Non existing flows references cleanup

Post by Desmanto » 06 Mar 2018 15:27

It is similar to Auto Glovar rename : viewtopic.php?f=4&t=7160
But this is for Flow.

For renaming flow, the set flow already can be updated accordingly.
But for delete, seems not yet. It seems to be quite risky to implement such feature. I prefer to delete it manually.
You can use search, to search the flow name. Or you can set "Set Flow State" or "Execute Flows"; then check if it has the deleted flow.

One of the risk that I can think right now is the replacing/updating flow. Someone probably create flows in the main phone and then update it to the tablet/secondary phone which they only have access remotely.
They probably can create HTTP request trigger. When they update from main phone, it will instruct the tablet to delete the previous flows, then main phone will send the updated flows to it and tablet will import it.
Or it can be the other way. Someone develop the full blown flows in the PC, using emulator. After finish, import it to main phone.

If the flow reference was deleted in flow B, when deleting the old flow A, flow B will be broken. This of course can be mitigated by having another checkbox at action delete flows, to not delete the reference.
Other things also, if this is going to be implemented, it should prompt us whether to delete or not. So we will see the flows name is referenced in which flow and we can choose which reference we want to remove.
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.

xdauser
Posts: 35
Joined: 05 Aug 2015 17:55

Re: Non existing flows references cleanup

Post by xdauser » 06 Mar 2018 20:25

So far I do it manually and it is pain in the ass most of the time. I agree it should be controlled and user should be prompted all the time when deleting

Locked