Some applications that manage long-running workflows lend themselves well to a more highly managed environment. Insurance claim processing is an example of a problem that lends itself well to a workflow solution. You can take advantage of this on Windows Server 2008 by using Windows Workflow Foundation or Microsoft BizTalk® Server.

Windows Workflow Foundation (WF) empowers .NET developers to build workflow-enabled applications and services on Windows. WF provides developers with an object model and is a lightweight, in-process workflow engine to implement long-running processes as either human or system workflows within a host application. WF is designed to be hosted within your .NET application, and provides memory and thread management of the workflows it is running.

In WF, workflows describe the work that is being done. A workflow is composed of one or more libraries in which you develop custom activities that describe the bits of work that need to be done. Activities available to workflow authors include the activities that are part of the .NET Framework (the base activity library), activities supplied by Microsoft or third parties (for example, activities for Windows SharePoint® Services, Microsoft Dynamics®, or Microsoft Speech Server), and custom activities that developers or organizations may build for their custom WF workflows. By building a library of activities, you make it possible for someone with less programming experience to put together a workflow by using the activities that you’ve defined. WF includes a workflow graphic designer for this express purpose that can be used within Visual Studio or rehosted within your own application.

In addition to expressing and composing your business processes graphically, WF provides your application with resilience and scalability. Because a workflow is designed to be long running, the WF runtime includes a provider model to automatically persist the state of your workflow, serialize it, and save it to disk, using a pluggable persistence provider. WF comes with a built-in provider to save workflows to a SQL Server database, which can provide persistence capabilities for one or more WF runtimes, allowing the execution of your workflows to scale across multiple computers without additional code in your application. For visibility, WF includes an extensible tracking service that automatically records state transitions in your workflows, along with any custom data that you supply.

Windows Workflow Foundation is designed to provide workflow support within an application. For enterprise application integration, BizTalk Server is more appropriate, although it doesn’t come packaged with Windows Server 2008. BizTalk Server is all about connecting applications with its many adapters. BizTalk Server does include an orchestration engine that may feel similar to WF, but as of this writing, the two are completely separate products.

The .NET Framework 4 includes a major overhaul of the WF runtime, making it easier than ever to build custom activities. The new WF makes it easy to have XAML-only workflows, without any need for code-behind files. It also includes an enhanced base activity library, flowchart model, and simplified data flow model. WCF and WF integration is improving as well, with new messaging activities, better Visual Studio integration, and hosting options.