Now and again a mistake at work triggers a solution. I inadvertently created a flow that was triggering too often, creating thousands of runs which only materialised in a testing environment.
I have then realised there is no easy way to cancel thousands of flow runs. The standard solution only allows you to cancel 20 at a time. There is a JavaScript and via PowerShell methods, but surely there should be a way with your indispensable Swiss Army Knife XrmToolBox
TL;DR
I have introduced a flow history button to allow display listing of the flow runs as well as the ability to cancel one or more runs.
Walkthrough
If you have connected to Dataverse or Flow API, there is now a new History column on the grid view.
Clicking on the icon will prompt you to confirm the settings for access to the API. This is the same if you have looked at non-solutioned flows, the steps are show in the original article here
Once you have connected, wait for the api to do it’s magic & retrieve all the runs (in the last 30 days).
Cancelling Flow Runs
Select one or more flow runs, then hit the cancel button
The main tool window will then show you progress,
with the main window refreshed to display the current status
I created a short gif highlighting the change
Next Steps
This part of the tool is quite seperate to the Visio, only combined as I have done lots of the hard work in the original, easier to add than create again.
I intend to split out and enhance the colour coding output. Any errors/enhancements, please log them on GitHub here
Thanks to Mohamed Ashiq Faleel and his article highlight the API calls needed.