Delay Activity in SharePoint 2010 Workflow (Visual Studio 2010) Not Firing

Three settings needed to be modified. Workflow Throttle, Workflow Batch, and the Hidden Workflow Timer.
You can check the current throttle setting by running the following command:

stsadm -o getproperty -pn workflow-eventdelivery-throttle

Here is my new setting:

stsadm -o setproperty -pn workflow-eventdelivery-throttle -pv “45”

You can check the current batch size setting by running the following command:

stsadm -o getproperty -pn workitem-eventdelivery-batchsize
Here is my new setting:

stsadm -o setproperty -pn workitem-eventdelivery-batchsize -pv “250”

You can check the current interval setting by running the following command, in which you replace the URL with a valid path to a SharePoint application:

stsadm -o getproperty -pn job-workflow -url http://yoursiteurl
Here is my setting:

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

The key part is that now provided I restart the Microsoft SharePointTimer service between deploys, it actually completes a delay!  So remember to recycle the “SharePoint 2010 Timer” service before you deploy a new version of the workflow to the farm.

To debug any code that runs after a delay, you have to attach Visual Studio to the timer service (owstimer.exe), not the w3w process.  I do this by switching off “auto retract after debugging” in the “SharePoint” page of the project’s properties file and manually attaching to the OWSTIMER.EXE process.

(The above is from the internet google search)

Advertisements
This entry was posted in SharePoint 2010, Visual Studio 2010, Workflow. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s