Tuesday, November 20, 2007

WSS3.0 Workflow History Deleted After 60 Days

I've just found a major hole in my plan for workflow history audit trails. Apparently by default, WSS3.0 automatically purges workflow history after 60 days. The purge doesn't technically delete the history - but it deletes the association that ties the document TO the workflow history (which is just as bad). And if that wasn't bad enough - it also deletes any tasks that were created by the workflow.

This is all courtesy of the Workflow Auto Cleanup timer job in the config section. Apparently it's done for "performance considerations" - but nobody really goes into much detail explaining this. It also makes no sense to me why you'd bother to delete the association - but leave all the detail..??

It seems Microsoft's intended purpose for the workflow history log is more like an IIS or Sharepoint log - meant to be recycled/not permanent (but then why do they not really delete it??).

Anyway, it seems we basically have three options:
  1. Disable the Workflow Auto Cleanup timer job completely
  2. You can include a specific xml tag in your workflow feature.xml file that controls the number of days retained for the workflow history (max days = 9999)
  3. Run a job nightly to force all the workflow history retention settings to a certain number of days (max days = 9999)
If I decide to go ahead with my planned workflows, I'll be implementing method #2.

But my concern is obviously what kind of performance issues we're really talking about here if we make these changes.

You can find more detailed information on the xml tag, the code details for the nightly job, and information in general on Dave Wollerman's blog and Robert Bogue's blog.

Good luck-


  1. "performance considerations" - nice going, Microsoft! :-)

  2. Damn if you do damn if you don't...

  3. Wow..This might exactly be what I am looking for..But what about the records whose Status I have lost..They are 185 in number..

    If I follow the steps you advised what it come back?


  4. Where exactly you will find a feature.xml
    file for custom sharepoint designer workflow.

    As from above --you are not pointing to workflowhistory list feature.xml....

    Can you little more specific the 2nd option is for Custom Visual Studio workflows..where we have an option to do the same.