Logging Workflow Activity in SharePoint Designer

Last week, I was working out how to loop and implement a state machine using SharePoint Designer and mentioned, as an aside, that I would probably write a blog post about better workflow logging.

Well, Sanjeev Rajput beat me to it.  Have a look

Saving log data into a custom list seems superior to using the regular workflow history:

  • It’s just a custom list, so you can export it to excel very easily.
  • You can create views, dynamically filter the data, etc.
  • It’s not subject to the auto-purge you get with regular workflow history.

There are some risks / downsides:

  • Many running workflows with a lot of logging could cause too much data to be written to the list.
  • Maybe you *do* want automatic purging.  You don’t get that feature with this approach (without coding).
  • Security is tricky.  In order to write to the list, the user must have permission to do so.  That means that it’s probably not suitable for any kind of "official" audit since the user could discover the list and edit it.  This could be overcome with some custom programming.


Technorati Tags:

Subscribe to my blog.

One thought on “Logging Workflow Activity in SharePoint Designer

  1. Sanjeev Rajput
    Thanks for the compliments Paul,
    I appreciate you pointing out some of the downfalls – I’ll add them as a link to my blog as well. I am trying to figure out a way to get around some of those issues as I type this. I am trying to make all of my application design without any custom code (one man show). For now, the very last process in the application, which closes the ticket, also contains the steps to wipe out all log history pertaining to the ticket. In my scenario, once the ticket is completed, I have no need for the workflow history. Any important steps (ie. who did what and when they did it) are stored in the lists, so I don’t need to keep the entries for the individual workflow steps.
    Now to tackle the security problem…

Leave a Reply to Sanjeev Rajput Cancel reply

Your email address will not be published. Required fields are marked *