Essential Windows Workflow Foundation

Book description

“Something big is about to happen….”
–From the Foreword by Don Box, Architect, Microsoft Corporation

 “If I were writing a Workflow book, this is what I would have written. The material is very well presented with code examples and explanations. Also, I love how the authors discuss the underlying architecture, enabling me to get a really deep understanding of the technology to efficiently design and build my own projects.”

–Jeffrey Richter (

“Explicit support for workflows in a lightweight framework is a major contribution. Many tough problems traditionally faced by application authors, such as state management in the presence of long-running activities (think weeks or months!), can be addressed systematically by adopting

a workflow approach. Dharma Shukla and Bob Schmidt present the workflow technology under and made accessible by the new workflow foundation in the .NET 3.0 framework, and they do so in an approachable and yet authoritative way that is truly enjoyable.”

–Clemens Szyperski, software architect, Microsoft Corporation

 “The Windows Workflow technology combines declarative programming and state machines in a very rich and powerful way, one that is bound to have a profound influence on the way we program in the coming years. In the style of the classic Essential COM by Don Box, Dharma and Bob have done a great job making this technology accessible to any developer already versed in C#, VB, and the .NET Framework, and who wants to achieve declarative enlightenment. Don’t miss out.”

–Joe Duffy, program manager, Common Language Runtime (CLR) team, Microsoft Corporation

 “I think WF should and will be used as the main application model for web service applications. Developers working on web services will want to learn about this technology from this book; it comes straight from the source and explains the technology well and in depth.”

–Krzysztof Cwalina, program manager, Microsoft Corporation

 “This book provides an enlightening exploration of Windows Workflow Foundation for both the novice and the veteran alike.”

–Nate Talbert, software design engineer, Microsoft Corporation

Windows Workflow Foundation (WF) is a groundbreaking approach to writing and executing programs. WF programs are assembled out of resumable program statements called activities, which provide encapsulation of both domainspecific logic and control flow patterns reflective of real-world processes.

In Essential Windows Workflow Foundation, two WF lead architects–Dharma Shukla and Bob Schmidt–offer an under-the-hood look at the technology, explaining the why and not just the how of WF’s key concepts and architecture. Serious WF developers seeking details about how to effectively utilize and extend the framework by writing activities will find cogent explanations and answers here. With simple and illustrative examples, the authors demonstrate exactly how to leverage WF’s extensible programming model to craft domain-specific programs. Drawing on their unique vantage point in designing and developing WF, Shukla and Schmidt deliver authoritative coverage of

  • The core concepts and ideas that form the heart of WF’s programming model

  • The execution model for activities, with details of the activity automaton, bookmarking, scheduling, and the threading model of the WF runtime

  • Advanced execution concepts, including activity execution contexts, transactions, persistence points, passivation, fault handling, cancellation, compensation, and synchronization

  • Hosting the WF runtime in applications

  • The activity component model, with details of validation, compilation, serialization, and visualization

  • Databinding, XAML, dependency properties, and WF program metadata

  • Declarative conditions and rules, activity designers, and designer hosting

  • Custom control flow patterns ranging from simple sequencing and iteration to more complex graphs and state machines

  • Dynamic editing of running WF program instances

  • Essential Windows Workflow Foundation is the definitive resource for developers seeking an in-depth understanding of this novel technology.

    Dharma Shukla is an architect at Microsoft working on next-generation programming models. A founding member of the Windows Workflow Foundation (WF) team, Dharma played a key role in defining the architecture of WF. Bob Schmidt is a senior program manager at Microsoft working on next-generation programming models. Since 2003, his primary focus has been on the design of WF. Both authors have been involved with the WF project since its inception, and have been responsible for specifying, designing, and developing large portions of the technology.


    About the Authors xiii

    Foreword xv

    Preface xvii

    Acknowledgments xxi

    1 Deconstructing WF 1

    2 WF Programs 33

    3 Activity Execution 53

    4 Advanced Activity Execution 111

    5 Applications 179

    6 Transactions 241

    7 Advanced Authoring 259

    8 Miscellanea 325

    Appendix A Activity Automaton 395

    Appendix B Control Flow Patterns 397

    Index 435

    Product information

    • Title: Essential Windows Workflow Foundation
    • Author(s):
    • Release date: October 2006
    • Publisher(s): Addison-Wesley Professional
    • ISBN: 9780321399830