K2 Support has not responded to requests for help (I had hoped K2 support would be better than this). Regardless, I have to get this working by tomorrow morning.
We had a code error in our MSSQL database resulting in creating 75,000 workflows with errors (yes, 75 thousand!!). I need to delete them as its totally killed our system. I know I can delete the version and therefore delete the workflows associated with it, but I'll lose the 300+ workflows that are needed and would have to restart them (difficult because there are many approval levels). Any ideas?
Best answer by tbyrne777
The easiest way would be to write a small little console app or even test project that references the K2 API (SourceCode.HostClientAPI, SourceCode.Workflow.Management). Here is an example that should get you most of the way there:
SourceCode.Workflow.Management.WorkflowManagementServer wms = new SourceCode.Workflow.Management.WorkflowManagementServer();
foreach (SourceCode.Workflow.Management.ProcessInstance pi in wms.GetProcessInstances())