Introducing the SqlWorkflowPersistenceService Service

If it becomes necessary to persist an executing workflow, something must actually perform the persistence action. However, saving and restoring workflow instances is optional—you don’t have to shuffle workflow instances off to a durable storage medium (such as a database) if you don’t want to. So it probably makes sense that persistence is implemented by a pluggable service, SqlWorkflowPersistenceService. WorkflowInstance works in concert with SqlWorkflowPersistenceService if the service is present when the workflow instance is running to perform the save and restore tasks.

On the surface, this all sounds relatively simple. If we need to swap a workflow instance out to the database, we just ...

Get Microsoft® Windows® Workflow Foundation Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.