I have read, that every now and then the "Workflow Auto Cleanup" job runs and cleans old workflow instances which are older than 60 days are deleted (or something along the lines).
I have a simple Visual Studio workflow attached to a list and it is running on let's say 5 items.
When I delete 4 of these items, the Workflow Status page of the list
WrkSetng.aspx still displays 5 instances of my workflow, even though I deleted 4 list items (via the normal UI - no code involved). I atually have never bothered about the number of workflow instaces, but I have several thousand workflow instances running, so if the old ones don't get deleted automatically I might run into a problem.
So my question is: Do I have to delete each workflow instance (including workflow history etc.) manually from the list item, e.g. by using
spSite.WorkflowManager.RemoveWorkflowFromListItem(myWorkflow) or do I just have to wait the 60 days and Sharepoint takes care of the rest?
I even tried running the "Workflow Auto Cleanup" job from the Central administration via Run Now, but it didn't seem to do anything - the number of workflow instances as reported by the settings page stayed at 5.