Thursday, January 8, 2009

Workflow clean-up job

Scenario:
SharePoint workflow activities include LogToWorkflowHistory and basically it logs an entry into the Workflow History List you selected while associating the workflow with List or Item.

Also another thing is that usually we write entries to this History List quite often to see the workflow progress which means multiple entries per Workflow execution. As with any SharePoint list, if your workflow history list exceeds 2000 items, site performance may be impacted. So sharepoint out of box has a Workflow clean-up job , which runs every day and delete the items older than 60 days.

Workflow history is not intended to be used as a means of auditing workflow events and is not necessarily secure.There are other better way to do it. Read about auditing.

Solution:
1. You can create a separate history list for each workflow association. But still you need to find out a way for history getting deleted which is 60 days old.
2. You can disable automatic cleanup of workflow history. ( This is the only fix to avoid deletion of the history information , but then you need to plan how to keep the list within 2000 item limit to avoid performance issues )

:-)

0 comments: