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.
Non existing flows references cleanup
Moderator: Martin
Re: Non existing flows references cleanup
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.
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Non existing flows references cleanup
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