An Introduction to Windows Workflow Foundation
Published: 28 Nov 2006
Windows Workflow Foundation (WF) is a component of WinFx that allows you to add workflow functionality to your applications. In this article Joydip discusses the key concepts related to Windows Workflow Foundation.
by Joydip Kanjilal
Average Rating: 
Views (Total / Last 10 Days): 31244/ 51


With the increasing complexity of business applications around the globe, there was a need for a technology that could not only reduce the operational costs for an enterprise by automating the business processes, but at the same time provide transparency or visibility of the business processes.  Windows Workflow Foundation is a relatively new technology from Microsoft that simplifies development of business processes in Microsoft .NET Framework.  Windows Workflow Foundation (WF) for development of Workflows or Workflow based applications uses the Microsoft .NET Framework and provides better visibility, expressiveness and control to the business processes.  The windows Workflow Foundation Framework typically consists of the following three components:

·         A runtime engine that can be used to execute a workflow

·         A set of activities that constitute a complete workflow

·         A set of services to support the executing workflow

This article provides a basic understanding of Business Processes, Workflows and the Windows Workflow Foundation Framework architecture.  It does not discuss how we can implement Workflows using the Windows Workflow Foundation Framework in Microsoft .NET; rather, it provides an overview of this awesome technology from Microsoft.  I would like to discuss implementation of Workflows using this framework in my forthcoming articles.

What is a Business Process?

Before we go deep into the concepts of Workflows and Windows Workflow Foundation, let us understand what a Business Process is and why Workflows and Workflow Management Systems are required in an enterprise.

A Business Process is a collection of a sequence of related business activities that produce a desired outcome targeted towards a specific business goal.  Note that each business process has inputs, method and outputs.  The Workflow Management Coalition (WFMC) defines a business process as, "A set of one or more linked procedures or activities which collectively realize a business objective or policy goal, normally within the context of an organizational structure defining functional roles and relationships."

What is a Workflow?

A workflow is a representation of a set of related, self-contained activities that represent specific business logic.  Activities are the building blocks of Workflow.  They can be used to represent business logic diagrammatically.  The Workflow Management Coalition (WFMC) defines Workflow as the “automation of a business process, in whole or part, during which documents, information or tasks are passed from one participant to another for action, according to a set of procedural rules.”  The Workflow Management Coalition is a non-profit international body for the development and promotion of workflow standards world wide.  What is a Workflow Management System (WFMS) then?  It is a system that, "defines, creates and manages the execution of workflows through the use of software, running on one or more workflow engines, which is able to interpret the process definition, interact with workflow participants and, where required, invoke the use of IT tools and applications."  It should be noted that all Workflow Automation Systems are process centric.  The benefits provided by Workflow automation of a Business Process are as under:

·         Reduced Cost

·         Improved quality, planning and service

·         Improved productivity

·         Business Process Control and Visibility

·         Business Activity Monitoring

Windows Workflow Foundation (WF)

Windows Workflow Foundation is a programming framework that consists of the necessary tools and an engine for creating and executing workflows.  It should be noted that WWF is an in-process engine that runs inside a host process that in turn provides a wide variety of services.

The Windows Workflow Foundation framework typically comprises of the following components:

·         Base Activity Library

·         A Runtime Engine

·         Runtime Services

·         A Graphical Designer

The Windows Workflow Foundation workflows are based on activities that in turn represent a business process. These activities can be of two types.

·         Composite activity

·         Individual activity

The following are the types of the Workflow applications that are supported by Windows Workflow Foundation in Microsoft .NET Framework.

1.    Sequential Workflow Console Application

2.    Workflow Activity Library

3.    State Machine Workflow Library

4.    Sequential Workflow Library

5.    State Machine Console Application

6.    Empty Workflow Project

7.    Sequential Workflow

Architecture of the Windows Workflow Foundation Framework

The basic architecture of Windows Workflow Foundation is comprised of the following layers.

·         The Hosting Layer

·         The Runtime Layer

·         The Workflow Model Layer

The Hosting Layer is one that provides pluggable interfaces between Windows Workflow and a specific host.  Note that a host can be a Web Application, a Web Service, etc.  The services provided by this layer include:

·         Persistence services

·         Thread support

·         Communication Support

·         Timer services

The Runtime Layer is a non-pluggable layer as is the core of the WWF architecture and is responsible for Workflow management and Workflow Execution.  The basic services provided by this layer include the following.

·         Workflow Execution

·         Workflow State Management

·         Workflow Activity Scheduling

·         Rules and Policy Management

The Workflow Model Layer provides the API for working with Windows Workflow Foundation in .NET framework.  Basically, the Workflow Model Layer defines two models.

·         The Sequential Workflow Model

·         The State Machine Workflow Model

The following sections discuss both these models with a self explanatory diagram in each case.

The Sequential Workflow Model

The Sequential Workflow model is used to depict structured workflows like a System to System Workflow.  The steps in such a Workflow Model are organized in a sequence.

Figure 1

The State Machine Workflow Model

In this type of a non-deterministic, non-sequential people centric Workflow Model, we find a representation of states and transitions between these states that typically represent a Workflow. The State Machine workflow Model is also known as the State Driven Workflow Model.  The diagram shown in the figure below illustrates a typical State Machine Workflow Model.

Figure 2



Microsoft Windows Workflow Foundation (WF) provides a powerful, extensible framework for creating, managing and executing workflows using the .NET Framework.  It enables development of complex business applications with ease.  This article has provided sufficient knowledge that is required for one interested in designing business applications using this excellent framework that Microsoft has provided us. I will be discussing more of this in my future articles on this technology; I will discuss how we can use this framework to implement business applications using .NET Framework.  So, stay tuned.

User Comments

Title: Author's Response   
Name: Joydip
Date: 2006-12-15 3:20:57 AM

This article was just an intorductory one for learners who have no knowledge of WWF whatsoever. Hence was just a preliminary article dealing with the basics. Stay tuned for more.
Title: Why was this article written?   
Name: me
Date: 2006-12-09 6:35:33 PM
Complete waste of space and time. This article does nothing to increase the reader's knowledge in any way. The "self explanatory" diagrams were good for a laugh though.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2023  |  Page Processed at 2023-11-28 1:50:11 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search