Featured image of post Flow to Visio - Run History and Cancel Active Runs

Flow to Visio - Run History and Cancel Active Runs

Post highlighting new ability of Flow to Visio which allows display of Flow Run history and cancel active runs

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.

Image showing new History button on Flow To Visio tool

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).

Image showing loading runs

Image showing all the flow runs

Cancelling Flow Runs

Select one or more flow runs, then hit the cancel button

Image showing instructions to cancel a flow

The main tool window will then show you progress,

Image showing cancelling flow progress

with the main window refreshed to display the current status

Image showing refreshed flow runs

I created a short gif highlighting the change

GIF showing changes to the tool

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.

comments powered by Disqus
My views, nothing to do with anyone else
Built with Hugo
Theme Stack designed by Jimmy