PacktLib: Microsoft Windows Workflow Foundation 4.0 Cookbook

Microsoft Windows Workflow Foundation 4.0 Cookbook

Credits

About the Author

About the Reviewers

Foreword

Preface

Workflow Program

Introduction

Creating the first WF program: HelloWorkflow

Creating a WF program using C# Code

Initializing a WF program using InArguments

Creating a WF program using OutArgument

Creating a WF program using InOutArgument

Using Variable in a WF program

Running a WF program asynchronously

Customizing a MyReadLine activity with Bookmark

Converting a WF program instance to XAML

Loading up a WF program from an XAML file

Testing a WF program with a unit test framework

Debugging a WF program

Built-in Flow Control Activities

Introduction

Using the Foreach activity

A number guessing game in Sequence

A number guessing game using a flowchart

Using the InvokeMethod activity

Using the Switch activity in Sequence workflow

Using the FlowSwitch activity

Using the Parallel activity

Using the ParallelForEach activity

Using the Pick activity

Handling errors

Messaging and Transaction

Introduction

Creating a pure WCF service

Receiving and replying to a WCF message

Receiving and replying to a WCF message in code workflow

Sending and receiving a reply to a WCF message

Sending and receiving a reply to a WCF message in code workflow

Using CancellationScope activity

Performing a transaction by using TransactionScope activity

Performing compensation by using Compensable activity

Performing manual compensation by using Compensate activity

Performing confirmation by using Confirm activity

Manipulating Collections

Introduction

Printing collection items

Using AddToCollection activity

Using ClearCollection activity

Using RemoveFromCollection activity

Using ExistsInCollection activity

Custom Activities

Introduction

Creating an activity by inheriting the root activity

Creating a FileWriter activity

Creating a SendEmail activity

Creating an Input Message activity using Bookmark

Creating an Asynchronous HTTP Get activity

Creating a Composite activity

Creating an Activity Designer for the SendEmail activity

Creating an Activity Designer for theMySquence activity

WF4 Extensions

Introduction

Configuring ETW tracking

Creating FileTrackingParticipant

Configuring the SQL persistence store

Loading a persisted workflow from the database

Using a persistence participant to persist additional data

Using a customized extension

Hosting Workflow Applications

Introduction

Hosting a workflow service in IIS7

Hosting workflow in ASP.NET

Hosting workflow in WPF

Hosting workflow in a Windows Form

Custom Workflow Designer

Introduction

Implementing designer layout

Implementing Toolbox, Workflow Designer, and Property Inspector views

Implementing New Workflow and Load Workflow events

Implementing Save and Save As events

Implementing XAML Workflow Tab and Run events

Implementing visual tracking

Index