SharePoint 2007 Workflow Persistence Service

Yesterday a friend asked me about the Windows Workflow (WF) Persistence Service in SharePoint 2007. As you might know SharePoint persists the state of workflows when it hits a persistent point. However the SharePoint WF host does not use the default Persistence Service provided by WF. In other words, you won’t see the Persistence Service database as part of the SharePoint 2007 installation. In that case how does SharePoint 2007 persists the state of long running workflows?

The WF persistence service of SharePoint 2007 is implemented as part of the SPWinOePersistenceService class of the Microsoft.SharePoint.Workflows namespace. This class implements the SaveWorkflowInstanceState and the LoadWorkflowInstanceState of the WorkflowPersistenceService class. The implementation of those two operations calls the SaveInstanceData and LoadInstanceData methods of the SPWinOeHostServices class which in turns calls the methods with the same signature in the SPWorkflowManager class. The following diagram illustrates the calls cycle.

 

Where is the data stored? The data is stored as a compressed binary representation in the Workflows table of the SharePoint content database. The column InstanceData represents the current workflow instance state.

 

Published Tuesday, November 14, 2006 5:12 PM by gsusx

Comments

Wednesday, November 15, 2006 8:44 PM by Jesus Rodriguez's WebLog

# SharePoint 2007 workflow tracking service

Complementing my previous post SharePoint 2007 workflow host does not implement a tracking service. The

Tuesday, January 16, 2007 1:36 PM by decatec

# re: SharePoint 2007 Workflow Persistence Service

Excellent ... Exactly what I was looking for for my work on a custom workflow tool for Sharepoint 2007

Thursday, May 17, 2007 8:37 AM by Alexei

# re: SharePoint 2007 Workflow Persistence Service

Quite superficial article, didn't give me anything useful except for the name of the persistence service class..

Why it doesn't work with Delay activity? How can I configure it?  

And so forth..

Thursday, February 21, 2008 11:50 AM by Binu

# re: SharePoint 2007 Workflow Persistence Service

How can we disable workflow persistance in sharepoint 2007 workflow. Its not possible for me to make all classes serializable

Sunday, May 04, 2008 6:15 AM by jaipal

# re: SharePoint 2007 Workflow Persistence Service

Nice article,it would have been  better had there been some good links regarding this matter

Tuesday, July 07, 2009 4:58 AM by Yasine

# re: SharePoint 2007 Workflow Persistence Service

hello, i was looking for that class "SPWinOePersistenceService" which provides persistence for SharePoint Workflow, but i found it internal, i can't be referenced in the project Code.

Thursday, December 10, 2009 5:13 PM by nickyan

# re: SharePoint 2007 Workflow Persistence Service

Thanks for the information but What happened to the diagram?   How about some examples?

Leave a Comment

(required) 
(required) 
(optional)
(required)