Monday, August 28, 2006
WWF 101: Introduction to Windows Workflow Foundation
Windows Workflow Foundation (WF) is Microsoft's latest platform for building workflow-enabled applications. Along with Windows Presentation Foundation (WPF) and Windows Communication Foundation (WCF), WF is part of the WinFX platform, now officially named as .NET Framework 3.0. While workflow capability has been available to developers using BizTalk Server and other third-party products, WF provides a single platform and programming model for Microsoft products (e.g. Office) and non-Microsoft products (developed using .NET) making workflow more of a mainstream paradigm. In it's simplest form, the workflow-based programming model consists of a set of business activities along with repetition and conditional logic that is modelled using some sort of a user interface. At run-time, the conditionals are evaluated and activities are executed based on the modelled workflow. If you have ever created a SQL Server DTS or SSIS package then you are already familiar with workflow-based programming model. Some of the advantages of workflow-based programming include durability, transparency, and tolerance to dynamic change. It allows for rule-based programming and supports a declarative model which allows for easy modelling and modification of business processes. WF nicely integrates into Visual Studio offering a rich design-time and debugging environment. Workflows can be hosted by any .NET executable assemblies including Win Forms and ASP.NET applications. WF comes with an array of built-in activities e.g. Code, Delay, Invoke, Throw, Suspend, etc., but the best part is that custom activities can be created as simply as deriving from the Activity base class and overriding the Execute method. Even composite activities can be created providing a rich and extensible programming model. The Activity Framework in WF provides several of out-of-the-box services such as transactions, compensation, serialization, etc. Other services can be added as desired. For example, by default workflows are persisted using XAML, but if needed custom serialization may be added. In conclusion, WF provides a very rich and highly extensible workflow-based programming model. With the passage of time we shall witness more and more Microsoft and non-Microsoft products using the WF to build and enhance applications that could use workflow functionality in new and innovative ways. As they say in French, the best is yet to come!