SharePoint 2010 State Machine delay activity (and why it may not fire)

Sun, Sep 23, 2012 One-minute read

A common problem in designing workflows is how to make the workflow “sleep” for a period whilst users do (or don’t do) something. A common scenario is where you wait for some user input, but if you don’t get any by a certain time to continue the workflow in a different stream. You achieve this with a delay activity where you specify a timeout in the form of a Timespan.

The delay activity was broken in SP2007 which was then fixed with a Hotfix. Surprisingly, this remains kind of broken in SP2010 as well. That is to say, the delay activity never wakes up.

This is due to a configuration value which is not set by default. Therefore, if you find that your delay activity doesn’t fire, you can issue the following commands:

stsadm -o getproperty -pn job-workflow -url http://yoursiteurl

This will show you the value of the property which will most likely be that it doesn’t exist. To fix this, issue:

stsadm -o setproperty -pn job-workflow -pv “Every x minutes between 0 and 59” -url http://yoursiteurl

Source.