Dec 03 2019 01:35 PM
I have used SharePoint Designer 2013 workflows before, and I am hoping that Power Automate Flows have a better way to handle the following scenario:
1,000 items in a SharePoint list. Each item, when created, starts a Flow to track approvals or progress or something. The important aspect is that the flow will stay active ("running") until the termination criteria is met, so say 80% of the list items have running Flows. Now something happens that we need to enhance the Flow logic, and we want all running Flows to pick up the change.
Is there a "best practice" way to refresh running Flows to use the new logic? I can not see it being practical to go into each item, cancel the Flow, then restart the Flow ... one-by-one.... One would think there is a more serviceable approach... no?
cc: @WWCaryn
Dec 03 2019 03:13 PM
Dec 03 2019 09:27 PM
Hi @WHSteve
There's no way to change a Running flow once it's begun as far as I know. Only new flows triggered will enjoy your amended logic changes.
You could try to disable the flow and then re-enable it to see if that stops the running flows.
Failing that, just disable the current flow, save as a new copy (new one should have your new amendments that you've made) and turn that one to manage the flow.
Good luck!
Damien
Dec 04 2019 06:11 AM
Totally agree with you @ChrisWebbTech and @Damien_Rosario ! And we do avoid using perma-run flows where possible. I guess the better question is: Is there a way to trigger a Power Automate Flow a week after creation of a record (and then again 3 days after that) without it actually running in the intervening time... this would avoid the issues caused by "perma-running" workflows.
Please consider this use case for your consideration... Reminders - This is the actual use case that drove the question:
The above workflow works great and has been effective in getting training rates up... particularly important as we have to re-cert on training annually and there are several thousand employees in scope for the training.
The only problem is when we need to make changes to the workflow code.... hence the question. No changes to the record means we can't trigger "on update" events, which is why we resorted to perma-run workflows.
Dec 04 2019 08:38 AM
Solution@WHSteve I would create a flow using a trigger of reoccuring, and set the flow to run once/day.
First step - have it get all items that were created 7 days ago that aren't completed, and send the reminder if the modified date is the same as the created date
Then next step, maybe get all non completed items again for 10 days in the past, check for changes/completions and escalate.
Or something along those lines...
Dec 04 2019 09:37 AM
THANK YOU @Robin Nilsson! That is an excellent idea... and one that isn't an option in SPD 2013 workflows so I didn't realize it would work in Power Automate. So much to learn in the new Power tools... I've been focused on PowerApps and haven't been able to start plumbing the depth of Power Automate. Much appreciated.
Dec 04 2019 08:38 AM
Solution@WHSteve I would create a flow using a trigger of reoccuring, and set the flow to run once/day.
First step - have it get all items that were created 7 days ago that aren't completed, and send the reminder if the modified date is the same as the created date
Then next step, maybe get all non completed items again for 10 days in the past, check for changes/completions and escalate.
Or something along those lines...