El Blanco's Office 2007 Blog

Friday, June 01, 2007

Issues with the Delay Activity in MOSS Workflows

If you are developing workflows in MOSS and have experienced issues using the Delay activity then this may help you . . .

I was experiencing weird behaviour when I used the Delay activity. I asked the delay activity to delay for 3 minutes - the first time it delayed for 5 minutes, then 15 minutes, then 30 minutes and so on . . .

If you are experiencing this also, make sure you have Windows 2003 Server SP2 installed and then obtain a copy of the hotifx for KB932816. Once this has been installed on the server - everything works as expected.

Another point to note is that the delay will actually expire based on the interval of Windows SharePoint Services Timer service (owstimer.exe). What happens when you use the delay activity is that the workflow is dehydrated to SQL in effect making it go to sleep. The next time that the Windows SharePoint Services Timer service runs it checks to see whether the delay has expired or not. If it has, then the processing of the workflow continues at this point. If it hasn't then this will be checked again when the Timer service runs again.

You can determine how regulary the timer service runs using the stsadm command line tool as follows:

stsadm -o getproperty -propertyname "job-workflow" -url http://localhost

To set this interval use the following stsadm command:

stsadm -o setproperty -propertyname "job-workflow" -propertyvalue "every 5 minutes between 0 and 59" -url http://localhost

Hope this helps explain the mystery !

2 Comments:

  • Thanks, this was very helpful.

    For some reason, the workflow job here was not set at all. You entry here helped me figure that out.

    Regards,

    --Paul Galvin (galvin.paul@gmail.com)

    By Anonymous Anonymous, at 7:34 pm  

  • Thanks for this post...

    One quick questions and probably to help understand more on the subject.

    "What is the 5 minutes in the job-workflow timer job? What if it is setup at 1 minute?"

    Since intervals on my workflow are 2 minutes wait or 3 minutes wait, but the timer job is set at 5. Does it make a difference?

    Kindly respond.

    By Blogger Kiran Somaya, at 1:57 pm  

Post a Comment

<< Home