What is Work Flow Foundation (WFF): Work Flow foundation is a framework, which enables user to build Workflows. Windows Workflow Foundation (WF) provides the declarative framework for building long running applications and service logic that gives developers a higher level of handling asynchronous, parallel tasks and other complex processing. WF is integrated with WCF which provides both creating and consuming services. Work flows can be broadly categorized as durable and non-durable. Durable WF services are inherently long running, persist their state and use correlation to follow-on activities.
Work Flow Persistence: An important capability of workflows is that they can be persisted. It means state of the application can be saved and reloaded at a later time. WF persistence is implemented as one of core services. WF includes a standard persistence service that works with SQL Server.
How Persistence Works: WF persistence works as two levels
- In Memory persistence
- Persistence Mechanism – which is externally pluggable
Persistence Mechanism: There are two types persistence mechanism
- Persistence with WFF: WF provides a standard persistence mechanism which works with Sql Server. This done by a service named ‘SqlWorkflowPersistenceService’ which implements ‘System.Workflow.Runtime.Hosting’ namespace
- Custom Persistence: Custom persistence implementation can also be done. WF includes a base class WorkflowPersistenceService which must be derived while implementing custom persistence service. Custom persistence service can use any kind of durable storage. For ex: XML, Binary files or Relational DB.
Further read: To know more about Work Flow Foundation please see the following links.