Skip to main content

SharePoint Blog

Go Search
  

SharePoint Blog > Posts > SharePoint Workflow History Cleanup Frequency
SharePoint Workflow History Cleanup Frequency

I’m working on developing a workflow for one of my clients and one of the requirements is to keep the workflow history for three years after the workflow has starting for auditing issues.

The Problem

Workflow history is deleted every 60 days by SharePoint (and that sucks)

The Solution

There are two things that you can do to overcome this problem

Solution 1:

Change the workflow history cleanup timer jobs so that they run every 3 years, but you will run the risk of overloading the workflow history lists. This can be accomplished by creating a small application that will go through all the timer jobs and update the schedule of the workflow history cleanup job.

image

Solution 2:

If you are working with a custom workflow, then in the workflow.xml MetaData, add the following:

<AutoCleanUpDays>1095</AutoCleanUpDays>

image

 

One thing to keep in mind is that the list of history items will get huge with time, if your list will grow larger than 2000 items, start considering running some kind of cleanup job that will organize your workflow history items into folder (not larger than 2000 items per folder level).

Comments

Mark J

Thanks Dennis!
That was really helpfull
at 6/16/2009 16:15
Note: To leave a comment, login to the site with Username and password: Visitor