4
votes

I had a workflow create a new version every 5 minutes for two weeks. It has caused a pretty big mess and the history is taking up a lot of space. I have fixed the workflow, deleted all the version history and I'm deleting items out of the Workflow History list right now. The area that I'm stuck in is the completed workflow history inside of list item its self. I don't have central administration access, so I can't run a script to delete it. I do have access to Designer. I tried removing the workflows and then publishing them again, that did not remove the history. The list is currently 700 MB with only 250 list items inside of it. There are no attachments in the list. Any suggestions on how to get ride of the completed workflow history would be greatly appreciated.

1

1 Answers

3
votes

You can easily do this using the object model and PowerShell:

$spweb = Get-SPWeb http://sps-server/website
$splist = $spweb.Lists["YourList"]
$spitem = $splist.GetItemById(1)
$spitem.Workflows | % { $web.Site.WorkflowManager.RemoveWorkflowFromListItem($_) }