Book Image

Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#

By : Kenneth Scott Allen
Book Image

Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#

By: Kenneth Scott Allen

Overview of this book

Windows Workflow Foundation (WF) is a technology for defining, executing, and managing workflows. It is part of the .NET Framework 3.0 and will be available natively in the Windows Vista operating system. Windows Workflow Foundation might be the most significant piece of middleware to arrive on the Windows platform since COM+ and the Distributed Transaction Coordinator. The difference is, not every application needs a distributed transaction, but nearly every application does have a workflow encoded inside it. In this book, K Scott Allen, author of renowned .NET articles at www.odetocode.com, provides you with all the information needed to develop successful products with Windows Workflow. From the basics of how Windows Workflow can solve the difficult problems inherent in workflow solutions, through authoring workflows in code, learning about the base activity library in Windows Workflow and the different types of workflow provided, and on to building event-driven workflows using state machines, workflow communications, and finally rules and conditions in Windows Workflow, this book will give you the in-depth information you need. Throughout the book, an example "bug reporting" workflow system is developed, showcasing the technology and techniques used.
Table of Contents (14 chapters)
Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#
Credits
About the Author
About the Reviewer
Preface

Chapter 3. Sequential Workflows

Windows Workflow offers two workflow execution styles out of the box: sequential and event-driven. A sequential workflow completes one activity and moves to the next, executing a sequence of consecutive steps. As an example, a sequential workflow could model the process of moving records from a website's compressed log file into a database table. Step 1 would download the compressed log file. Step 2 would decompress the log file. Step 3 would bulk insert records from the log file into a table, and step 4 would create summary statistics from the new records. Even though a sequential workflow can use branches, loops, and receive external events, it is mostly predictable and marches inevitably forward to completion.

Event-driven workflows, on the other hand, rely on external events to drive them to a finishing point. Event-driven workflows model a workflow as a state machine. A state machine consists of a set of states (including an initial state and a final...