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 sen开发者_运维技巧ds 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.
- What would be the "best" way to just fire a workflow, let it sit and do nothing for several weeks and then continue (also: state machine vs. sequential)?
- Any help on setting it up in Visual Studio? (Needed Properties & Handlers?)
PS: Cross post from SharePoint.SE.
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.
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.
精彩评论