Saturday, September 20, 2008

MOSS Workflow History Best Practice

If you are designing a workflow solution in MOSS on of the first things you may think about incorporating into your solution is the Workflow History. The value proposition of using the Workflow History was:

  • When building workflows there is an activity you can drag right onto the process which will set values into the Workflow History table. It is really simple to use.
  • Users will be able to see all of the information immediately right there on the screen in the Workflow State page.

However after doing some more thinking and contacting a few of my colleagues I quickly decided not to use it to any great degree. Here are a couple of the issues that are with it.

  • First, the workflow history table will be cleaned up by SharePoint after a period of time. This time can be configured using the AutoCleanupDays however it will be run at some time. It will not actually delete the logs, but it will delete the log associations to the workflow instance and it will delete any tasks that are associated to the workflow instance.
  • Second, I got concerned with sizing of the workflow history list in general given the 2,000 item rule for a list. If you use it a lot you will quickly eclipse this and there can be performance issues. So the workflow history will have to have data deleted from it on a regular basis.
  • Third, in my opinion there is no real good way to search, query or do business reports of this data.
  • Fourth, since workflows can be removed from a list. Once the workflow is deleted, if you go back to the item the workflow instances will be deleted. This basically means to me that this data is not well managed.

The best practice in my opinion is to use the workflow history if you want to print out some quick information to the user on the workflow page or if you want to use it as a way to do some logging. It should not be used as a solution to satisfy auditing requirements. If you have that as a requirement, I would highly recommend dumping some data out to a custom database which can scale and is easier to query.


No comments: