Introduction to .NET Framework 3.0/Windows Workflow Foundation

From Wikibooks, open books for an open world
< Introduction to .NET Framework 3.0
Jump to: navigation, search

Windows Workflow Foundation is a new component introduced by .NET Framework 3.0.

A workflow is a reliably repeatable pattern of activity enabled by a systematic organization of resources, defined roles and mass, energy and information flows, into a work process that can be documented and learned. Workflows are always designed to achieve processing intents of some sort, such as physical transformation, service provision, or information processing.

Activites[edit]

A workflow is a set of activities. Each of these activities is a class which performs a particular operation. In Windows Workflow Foundation (WWF), they are coded using a language called XAML which has been introduced specifically for this purpose.

Workflow activities are classes which are created by the author and contains methods programmed by the author which could be called and executed by the workflow. There are different types of activities: Basic activities and composite activities. Basic activities are single activities executed by the workflow while composite activities are made up of activities. Apart from this, users can also create custom activities based on existing activities.

Typically, the WWF is made up of a number of activities or individual programs which are interlinked using XAML code. Hence, we need to include the namespace System.Workflow.ComponentModel.

Types of Workflow[edit]

There are two types of workflows provided by WWF.

  • Sequential Workflow
  • State-machine workflow

Components of WWF[edit]

WWF is made up of the following components:

  • Base Activity Library
  • Runtime Engine
  • Runtime Services
  • Hosts

Base Activity Library[edit]

The base activity library usually contains some well-known or frequently used activities which are executed by the workflow. Besides, users can also add custom-built activities for use into the workflow. These could be activities which have been developed from existing activites or activities that have been coded from scratch. The base activity library is quite similary to the base class library(BCL) of the .NET framework and Java Class Libraries.

Runtime Engine[edit]

Another component which forms a part of Windows Workflow Foundation is the Runtime Engine. As the name implies, this consist of the runtime classes and services required for the program to run. These runtime services of the runtime engine perform the same role as providers.

Runtime Services[edit]

The runtime engine offers a number of runtime services for the workflow to run by default. But in case you want to add services on your own, you could do so by choosing and adding new services directly in the web.config. This is one of the major advantages of .NET Framework 3.0. Besides, you can also create your own custom services and implement them in your workflow. Hence, runtime services of WWF are fully extensible.

Hosts[edit]

A hosting application or a host is the application which hosts workflows. These are applications which actually contain the workflows which are embedded in the application.

WF workflows define interfaces with methods and events to communicate with the outside world. A host application typically sets up an environment before running a workflow, providing objects that implement those interfaces. When an object implementing such interfaces raises an event, the corresponding workflow is retrieved and the data passed on to it.

Visual Designer[edit]

The Visual Designer is a component of WWF that provides a flowchart-based model of the workflow along with the different activities. The important feature of the Visual Designer which differentiates it from designers provided with the earlier versions is the presence of a facility to include the designer in an application. true, the visual designer model of a workflow could be introduced in an application by adding a Visual Designer tool. This helps to create a monitoring tool and in the maintenance of the workflow-based application.

References[edit]

  1. Wikipedia article on 'Windows Workflow Foundation'