Presenting Windows Workflow Foundation, Beta Edition

Book description

Presenting Windows Workflow Foundation is a premium reference that provides information on a key part of WinFX, providing universally accessible and consistent workflow technology for the Windows platform. Windows Workflow Foundation delivers an API as part of WinFX and a workflow designer hosted in Visual Studio 2005.

The Windows Workflow Foundation supports development of both sequential and state-based workflow involving both human and system interaction. Sequential workflow is a map of activities that may be in series or parallel. State-based workflow is a state machine where events cause transitions. Rules can be specified that drive decision making in a workflow and can be updated easily at runtime. Workflow can be created as a model and executed inside many host applications including Windows Forms, console applications, or Web applications.

  • Key Scenarios that can be developed with Windows Workflow Foundation include:

  • Document management: The steps involved in the review and approval of shared documents or other content.

  • Line of business application: The processing flow or business logic in an extensible part of the application.

  • Website page flow: The flow of state variables between web pages.

  • IT management: Handling of common systems management processes.

  • Decision making logic: Where complex business logic is well described by a sequential or state diagram.

  • Consumer: A common series of steps for consumer PC usage.

  • Download the source code from the book at www.samspublishing.com

    Table of contents

    1. Copyright
    2. About the Authors
    3. We Want to Hear from You!
    4. Introduction
    5. 1. Workflow, Tomorrow’s Application Logic
      1. The Wonder of Flowcharts
      2. Today’s Workflow Scenarios
      3. Introducing Windows Workflow Foundation
      4. Windows Workflow Foundation Engine Architecture
        1. Hosting Layer
        2. Runtime Layer
        3. Workflow Model Layer
        4. Design-time
        5. Office 12 Workflow
        6. Call to Action: Core Workflow Tenets
      5. Summary
    6. 2. Developing Your First Workflow
      1. Architecture Review
      2. What You Need
      3. Your First Console Workflow Application
        1. Workflow Console Application
      4. Adding Input and Output to a Console Application
        1. Describing the Existing Console Host
        2. Adding the Parameters
      5. Windows Forms Application
        1. The Windows Forms Application
        2. The Sample Solution
        3. Inside the Windows Form Class
        4. Inside the Workflow Class
        5. The Workflow Design
        6. More on the Workflow Design
        7. Running the Application
      6. Summary
    7. 3. March Through the Activities
      1. Table of Activities
        1. Container for Activities
        2. Conditions
        3. Declarative Condition
      2. Control Flow Activities
        1. Sequence Activity
        2. Parallel Activity
        3. IfElse Activity
        4. While Activity
          1. For-Next Loop Implemented with a While Activity
        5. ConditionedActivityGroup Activity
        6. Replicator Activity
        7. Delay Activity
      3. Workflow Lifetime Activities
        1. InvokeWorkflow Activity
        2. Suspend Activity
        3. Terminate Activity
      4. Event Waiting Activities
        1. EventDriven Activity
        2. Listen Activity
      5. Transaction and Exception Activities
        1. TransactionalContext Activity
        2. Throw Activity
        3. ExceptionHandler Activity
        4. Compensate Activity
      6. Data-Centric Activities
      7. Web Services Activities
      8. The Code Activity
      9. State Workflow Activities
        1. State Activity
        2. StateInitialization Activity
        3. SetState Activity
      10. Custom Activities
        1. InvokeMethod Activity in Communications Library
        2. EventSink in Communications Library Activity
        3. Composite Activity in Activity Library
        4. Coded Activity in Activity Library
      11. Summary
    8. 4. Workflow in Microsoft Office System
      1. Key Vision Elements
        1. A Workflow Engine for Office
      2. Where Humans Meet Workflow—The Office Workflow Experience
        1. Workflow Actors
        2. Workflow User Experience
          1. Workflow Association
          2. Workflow Initiation
          3. Workflow Notification
          4. Workflow Tasks and Task Completion
          5. Workflow Status
          6. Workflow Reporting
        3. Out-of-the-Box Office Workflows
      3. Windows Workflow Foundation Integration
        1. Topology and Persistence
        2. Workflow Dehydration Model
        3. Event Delivery
        4. The Workflow Timer Provider
        5. Object Model and Web Services
        6. History and Reporting
      4. Designing Workflows for Office
        1. Workflow Model and Forms Authoring
        2. Office Activities
        3. Metadata, Packaging, and Deployment
      5. Summary
    9. 5. Workflow Integration with Data Activities
      1. What You Need
      2. Workflow Integration with XML Documents at a Glance
      3. What Are Data Activities?
        1. Why Data Activities?
        2. Data Activities Types
        3. Data Sources
          1. Types
          2. Unique Keys
          3. Data Handlers
            1. UpdateData
            2. SelectData
        4. DataSourceService
        5. Data Exchanges
        6. InfoPath Data Exchange Application
          1. Sample Scenario
            1. Workflow Development
            2. Workflow Development
            3. Windows Application Development
      4. Summary
    10. 6. Using Web Services
      1. Using Web Services with Windows Workflow Foundation
      2. Calling a Web Service
      3. Calling a Web Service from a Workflow
        1. Using Web Services: An Example
        2. Sessions
        3. Adding the Web Reference Manually
      4. Exposing a Workflow via a Web Service
        1. Hooking Up the Workflow-generated WebService
        2. State Machine Workflows and Web Services
      5. Summary
    11. 7. Developing Activities
      1. Activity Component Model
      2. Anatomy of an Activity
        1. Activity Definition
        2. Component References
        3. Activity Executor
        4. Activity Validator
        5. Activity Designer
        6. Activity Toolbox Item
      3. Summary
    12. 8. Advanced Activities and Activity Behaviors
      1. Replicator
        1. Replicator Overview
        2. Replicator Example
        3. Additional Replicator Topics
      2. Conditioned Activity Group (CAG)
        1. CAG Overview
        2. CAG Examples
          1. Parallel Execution
          2. Parallel But Optional
          3. Dependent Activities
          4. Looping Behavior and the Until Condition
      3. Policy
        1. Policy Overview
        2. Policy Example
        3. Additional Policy Topics
          1. Priorities
          2. Chaining
          3. Method Access
          4. Halt and Update Functions
          5. Maximum Execution Count
          6. Externalization and Programmatic Execution
      4. Advanced Activity Behaviors
        1. Transactions
          1. Atomic Transactions
          2. Long-Running Transactions
        2. Compensation
        3. Exception Handling
        4. Event Handling
        5. Synchronization
          1. Behavior Relationships
        6. Activity Behaviors Example
      5. Summary
    13. 9. Workflow Communications with .NET
      1. What You Need
      2. Workflow Communications at a Glance
      3. Local Communication Services Overview
        1. Why Local Services?
        2. Data Activities Versus Local Services
        3. Local Service Interface
        4. Defining Correlation Values
        5. WorkflowMessageEventArgs
        6. InvokeMethodActivity
        7. EventSinkActivity
        8. Service Request Form Application
          1. Workflow Development
          2. WinForm Development
      4. Summary
    14. 10. State Machine Workflow
      1. The Business Process Landscape
      2. State Machine Workflows: A New Way of Creating Business Applications
      3. Structure of the State Machine Workflows
      4. A Simple State Machine Workflow
      5. The State Machine Workflow Root Activity
      6. The State Activity
      7. The Event-Driven Activity in a State Machine Workflow
      8. Transitions from One State to Another—The Set State Activity
      9. Recursive Composition of State Activities
      10. Dynamic Update in State Machine Workflows
      11. Skip and Rework Patterns in State Machine Workflows
      12. Summary
    15. 11. Hosting Workflows in Your Application
      1. Runtime Architecture
      2. Workflow Runtime APIs
      3. Building a Workflow Host
        1. Getting Started with the WorkflowRuntime Class
        2. Starting Workflows
          1. Starting Workflows Using Reflection
        3. Workflow Lifecycle and Events
        4. Controlling Workflow Instances
      4. Runtime Services
        1. Using Runtime Services
      5. Using Persistence with the SqlStatePersistanceService
        1. Using the SqlStatePersistenceService
          1. Create the SQL Server Database
          2. Create the Tables and Database Objects
          3. Add the SqlStatePersistenceService to the WorkflowRuntime
        2. Load and Unload Workflow Instances
      6. Using Tracking with the SqlTrackingService
        1. Using the SqlTrackingService
        2. Viewing Workflow Tracking Data
        3. Viewing Tracking Data with WorkflowMonitor
        4. Tracking Profiles
      7. Creating a Custom Runtime Service
        1. Developing the Console Tracking Service
        2. Testing the Console Tracking Service
      8. Summary
    16. 12. Dynamic Update of Workflow
      1. Modifying a Workflow Instance
        1. Modifying a Workflow from the Inside
        2. Warning—Existing Activities Not Modifiable
        3. Modifying a Workflow from the Outside
      2. Controlling Modifiability
      3. Planning for Changes—Open-Points
      4. Summary

    Product information

    • Title: Presenting Windows Workflow Foundation, Beta Edition
    • Author(s): Paul Andrew, James Conard, Scott Woodgate, Jon Flanders, George Hatoun, Israel Hilerio, Pravin Indurkar, Dennis Pilarinos, Jurgen Willis
    • Release date: September 2005
    • Publisher(s): Sams
    • ISBN: 9780672328480