Forum Discussion
How to update running Power Automate Flows
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
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...
- You wouldn't want to have flows stay "Running", you would just have a flow run on every change and progress from there by utilizing a hidden status column or flow control. This way if you update your flow, the next "Update" that happens will utilize the changes based on the step it is in the workflow.
- WHSteveCopper Contributor
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:
- When a user is added to the TrainingTracker list, we kick off a workflow that tells the user where to access the training and when it must be completed by
- Then the workflow sleeps for a week
- When the workflow wakes up, it checks the status. If training is completed, it ends. If there have been no changes, it sends a reminder/escalation email
- Then the workflow sleeps for 3 days
- When the workflow wakes up, it checks the status. If training is completed, it ends. If there have been no changes, it sends an escalation email
- etc. (there are more steps, but it will send reminders until the training is completed
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.
- Robin NilssonBronze Contributor
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...
- Damien_RosarioSilver Contributor
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