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

Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 50%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Add event-driven workflow capabilities to your .NET applications.
  • Highlights the libraries, services and internals programmers need to know
  • Builds a practical  "bug reporting" workflow solution example app

Book Details

Language : English
Paperback : 252 pages [ 235mm x 191mm ]
Release Date : December 2006
ISBN : 1904811213
ISBN 13 : 9781904811213
Author(s) : K. Scott Allen
Topics and Technologies : All Books, Application Development, Microsoft Development , Enterprise, Microsoft, .NET

Table of Contents

Chapter 1: Hello, Workflow
Chapter 2: Authoring Workflows
Chapter 3: Sequential Workflows
Chapter 4: The Base Activity Library
Chapter 5: Custom Activities
Chapter 6: Workflow Hosting
Chapter 7: Event-Driven Workflows
Chapter 8: Communication in Workflows
Chapter 9: Rules and Conditions
  • Chapter 1: Hello, Workflow
    • Building Workflow Solutions
    • A Windows Workflow Tour
      • Activities
        • Custom Activities
      • Visual Studio 2005 Extensions
        • Windows Workflow and XAML
        • WF Validation and Debugging
        • Designer Looks
      • The Windows Workflow Runtime
        • Hosting the Windows Workflow Runtime
        • Runtime Services
    • Our First Workflow
    • Summary
  • Chapter 2: Authoring Workflows
    • Pure Code
      • Pure Code and Visual Studio
    • Objects and Their Relationships
    • Pure XAML
      • Using Custom Activities in XAML
      • Compiling Workflows
        • Compiling with Wfc.exe
        • Compiling with WorkflowCompiler
        • Compilation with MSBuild
        • Code Generation and XAML Serialization
      • XAML Activation
      • XAML-only Summary
    • Code and XAML Together
    • Summary
  • Chapter 3: Sequential Workflows
    • The SequenceActivity
      • Simple Flow
        • Sequences Inside Sequences
    • Workflows and the Outside World
      • Workflow Instance Lifetime Events
      • Workflow Parameters
      • Raising Events and Invoking Methods
        • Service Contracts
        • Service Implementation
        • Workflow Implementation
        • Host Implementation
    • Faults
    • Summary
  • Chapter 4: The Base Activity Library
    • The Basics
      • The CodeActivity
      • The IfElseActivity
      • The WhileActivity
      • The SequenceActivity
      • The SuspendActivity
      • The TerminateActivity
      • The ThrowActivity
      • The InvokeWorkflowActivity
      • The ParallelActivity
      • The DelayActivity
      • The ListenActivity
      • The EventHandlingScopeActivity
      • The SynchronizationScopeActivity
      • The ReplicatorActivity
    • Local Communication Events
      • The CallExternalMethodActivity
      • The HandleExternalEventActivity
      • The Activity Generator
    • Fault Handling
      • The FaultHandlersActivity
      • The FaultHandlerActivity
    • Transactions and Compensation
      • The TransactionScopeActivity
      • Compensation
      • The CompensatableSequenceActivity
      • The CompensatableTransactionScopeActivity
      • The CompensateActivity
    • Conditions and Rules
      • The ConditionedActivityGroup
      • The PolicyActivity
    • Web Services
      • The InvokeWebServiceActivity
      • The WebServiceInputActivity
      • The WebServiceOutputActivity
      • The WebServiceFaultActivity
    • State Activities
      • The StateActivity
      • The StateInitializationActivity
      • The StateFinalizationActivity
      • The EventDrivenActivity
      • The SetStateActivity
    • Summary
  • Chapter 5: Custom Activities
    • Why Would I Build Custom Activities?
      • Reusability
      • Extensibility
      • Domain-Specific Languages
    • How Do I Build Custom Activities?
    • Activity Composition
      • Opening a Black Box
        • Property Promotion
      • Composition Summary
    • Dependency Properties
      • Activity Binding
      • Attached Properties
      • Meta-Properties
      • Dependency Property Summary
    • Derivation
      • ConsoleWriteActivity
      • Activity Components
        • Activity Validators
        • Activity Designers
    • Activity Execution
      • Execution Context
      • Custom Composite Activities
    • Summary
  • Chapter 6: Workflow Hosting
    • The Workflow Runtime
      • Workflow Runtime Logging
      • Workflow Runtime Configuration
        • Workflow Configuration Sections
    • Scheduling Services
      • Scheduling Services and Threads
      • Scheduling Services and Configuration
        • Scheduling Parameters
      • Choosing the Right Scheduling Service
    • Persistence Services
      • Persistence Classes
      • The SqlWorkflowPersistenceService
        • SQL Persistence Service Configuration
        • Running with Persistence
        • Persistence and Serialization
    • Tracking Services
      • Tracking Classes
      • Tracking Configuration
      • Running with Tracking
        • Tracking Profiles
      • Data Maintenance
    • Persistence and Tracking Together
      • Shared Connection Configuration
    • Summary
  • Chapter 7: Event-Driven Workflows
    • What Is a State Machine?
    • State Machines in Windows Workflow
    • Our First State Machine
      • Creating the Project
      • Life of a Bug
      • The State Activity
        • The EventDriven Activity
        • The SetState Activity
        • The StateInitialization and StateFinalization Activities
      • Driving the State Machine
    • Inspecting State Machines
      • StateMachineWorkflowInstance
      • State Machine Tracking
    • Hierarchical State Machines
    • Summary
  • Chapter 8: Communication in Workflows
    • Local Communication Services Redux
      • Correlation Parameters
        • Correlation Attributes
        • Correlation Tokens
      • RoleBased Authorization
        • Roles and Activities
      • Workflow Queues
        • WorkflowQueue and WorkflowQueueInfo
        • Finding the Waiting Activity
        • Canceling a Waiting Activity
        • Communicating with Queues
    • Web Service Communication
      • Workflows as Web Services
        • WebServiceInput Activity
        • WebServiceOutput Activity
        • Publishing Web Service Workflows
      • Workflows as Web Service Clients
        • InvokeWebService Activity
    • Summary
  • Chapter 9: Rules and Conditions
    • What are Rules and Conditions?
    • Working with Conditions
      • Code Conditions
      • Rule Conditions
        • The .rules File
        • Available Expressions
        • Rules and Activation
      • The Conditioned Activity Group
        • When to Use the CAG
    • Working with Rules
      • The Policy Activity
        • Creating a Policy Workflow
        • Evaluation
        • Priority
        • Rule Dependencies
        • Controlling Chaining
      • Rules Engine Tracing and Tracking
        • Tracing Rules
        • Tracking Rules
      • Dynamic Updates
    • Summary

K. Scott Allen

K. Scott Allen is the Chief Software Architect for Medisolv, Inc and holds MCP and MCSD certifications. In 12 years of software development Scott has worked on everything from real time firmware in 8 bit embedded devices to highly scalable Internet applications connecting COM+ and J2EE components with web services. Living in Hagerstown, Maryland, Scott tries to play as much softball as possible during the summer. Scott is a cofounder of the site, a .NET developer resource built using the Community Starter Kit.

Contact K. Scott Allen

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C# +    Microsoft Visual Studio LightSwitch Business Application Development =
50% Off
the second eBook
Price for both: £28.05

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Create an example "bug reporting" workflow solution using the techniques and skills gained from each chapter
  • Understand what Windows WF is, and what it can do for you
  • Learn about the runtime services available in Windows WF
  • Author workflows with C#, and with XAML, the extensible application markup language
  • Use the workflow compiler to better understand how WF uses code generation to produce classes from workflow markup
  • Combine generated workflow code with our hand-written code to produce a workflow type
  • Learn about the events fired by the workflow runtime during the life of a workflow instance
  • Build workflows that accept parameters and communicate with a host process by invoking methods and listening for events
  • Learn about each activity in the Windows WF base activity library; the control flow activities, communication activities, and transaction-oriented activities
  • Learn about web service activities, rule-centric activities, and state activities
  • Creating custom activities using both a compositional approach and a derivation approach
  • Master the execution context, a vital ingredient for creating any robust activity
  • Learn about the workflow runtime, workflow diagnostics, and the out-of-the-box services provided for WF by Microsoft.
  • Using scheduling services, persistence services, and tracking services
  • Select and configure the services needed for a wide variety of scenarios and environments
  • Use local services for communication with a host process, and web service activities for communication across a network
  • Uncover the queuing service used behind the scenes of a workflow to coordinate and deliver messages
  • Create rules and conditions in Windows Workflow Foundation
  • Understand the role of business rules in software development and see examples of how Windows WF's rules engine can take away some of the burden of rule development

In Detail

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, 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.

A fast-paced and practical developer's road map to working with Windows WF, from compilation to the base activity library to runtime services.


Fast-paced and to-the-point, this book takes you through the important topics of Windows WF development with clear explanations and practical example code. The book's selection of topics is driven by what the working developer needs to know. It is neither a comprehensive reference to the whole WF architecture, nor a strategy guide to the complete application development lifecycle. It's just what you as a C# developer need to know to use WF in your applications.

Who this book is for

This book is for .NET developers who want to enhance their applications with flexible workflow capabilities using Microsoft Windows Workflow Foundation. The author assumes that you have read other texts on the overall architecture of WF and on WF application design strategies, and instead focuses on real-work implementation issues for C# developers.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software