Chapter 22. Building a Sequential Workflow Using the Windows Workflow Foundation

According to Wikipedia (http://en.wikipedia.org/wiki/Workflow): "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." That sounds like workflow is pretty important stuff. In today's business world you will hear the term workflow over and over again.

As you build programs, you will need to integrate some type of workflow support. For example, when a new customer signs up for an account you may want the program to handle some type of workflow. In Windows Workflow Foundation (WF), there are two basic types of workflows: sequential (also referred to as system) and state machine (also known as human/event-driven). A sequential workflow is designed in a manner where one process happens after another until the workflow is complete. A state machine workflow is designed to handle external events; it does not typically have a set start and end. Take a look at two scenarios, each involving processes used by a cell phone.

Here's a breakdown of some of the phone events and states of a cell phone:

  • Letter key pressed

  • Function key pressed

  • Phone call received

  • Text message received

  • Battery critically low

  • No service ...

Get Beginning Microsoft® Visual Basic® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.