Dennis G
Dennis G

Reputation: 21788

Pause Sharepoint workflow for longer duration (i.e. weeks)

I want to pause a workflow for 6 weeks. After that duration it checks a specific list for an item and sends an email when found - very simple.

There are two activities in Visual Studio: delayActivity and suspendActivity. I suspect that suspend is better as it probably dehydrates the workflow and saves resources.

PS: Cross post from SharePoint.SE.

Upvotes: 0

Views: 1583

Answers (2)

Anita Boerboom
Anita Boerboom

Reputation: 586

The suspendActivity stops the execution of the workflow, but doesn't permanently terminate the workflow. It is used where the workflow has an error but the error is recoverable and the workflow can be restarted at the point of failure.

The delayActivity can be used to pause a workflow for a period of time. This is the one you've got to use in your case.

The type of workflow (state machine vs sequential) depends on the requirements.

Maybe you can Google for examples, I guess there are plenty out there.

Upvotes: 1

Madhur Ahuja
Madhur Ahuja

Reputation: 22699

The persistence is already built into workflows for sharepoint.

See: http://weblogs.asp.net/gsusx/archive/2006/11/14/SharePoint-2007-Workflow-Persistent-Service.aspx

The link is for sharepoint 2007 workflows, but I believe the architecture is not very different in SharePoint 2010.

Upvotes: 1

Related Questions