Free Sample
+ Collection

Microsoft Windows Workflow Foundation 4.0 Cookbook

Andrew Zhu

Get the flexibility of Windows Workflow Foundation working for you. Based on a cookbook approach, this guide takes you through all the essential concepts with recipes you can apply or adapt to your own specific needs.
RRP $29.99
RRP $49.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849680783
Paperback255 pages

About This Book

  • Customize Windows Workflow 4.0 applications to suit your needs
  • A hands-on guide with real-world illustrations, screenshots, and step-by-step instructions
  • Explore various functions that you can perform using WF 4.0 with running code examples
  • A hands-on guide with real-world illustrations, screenshots, and step-by-step instructions


Who This Book Is For

If you find yourself working with Windows Workflow Foundation 4.0 and you have basic knowledge of C#/.NET Framework/ VB and workflow, this book is for you. It will be best if you know both C# and VB, because WF 4.0 expression can only be written in VB (at the time of writing). With this book, you will be able to enhance your applications with flexible workflow capabilities using WF 4.0. To follow the recipes, you will need to be comfortable with .NET Framework, C# programming, basics of SOA, and how to develop them.

Table of Contents

Chapter 1: Workflow Program
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
Chapter 2: Built-in Flow Control Activities
Using the Foreach activity
A number guessing game in Sequence
A number guessing game using a flowchart
Using the InvokeMethod activity
Using the Switch<T> activity in Sequence workflow
Using the FlowSwitch<T> activity
Using the Parallel activity
Using the ParallelForEach<T> activity
Using the Pick activity
Handling errors
Chapter 3: Messaging and Transaction
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
Chapter 4: Manipulating Collections
Printing collection items
Using AddToCollection<T> activity
Using ClearCollection<T> activity
Using RemoveFromCollection<T> activity
Using ExistsInCollection<T> activity
Chapter 5: Custom Activities
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
Chapter 6: WF4 Extensions
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
Chapter 7: Hosting Workflow Applications
Hosting a workflow service in IIS7
Hosting workflow in ASP.NET
Hosting workflow in WPF
Hosting workflow in a Windows Form
Chapter 8: Custom Workflow Designer
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

What You Will Learn

  • Design and develop WF applications
  • Control the workflow of data using arguments and variables
  • Create a machine state style workflow using Flowchart
  • Explore and use the built-in activities of WF
  • Customize persistence and tracking extensions using WF
  • Create Windows Workflow as a WCF service
  • Host Windows Workflow in other applications (ASP.NET, WPF)
  • Create your own independent WF Designer
  • Tune WF applications to run steady and fast


In Detail

Windows Workflow Foundation 4.0 (WF) is a significant part of .NET Framework 4.0. WF makes workflow technology available to every single programmer that uses the .NET Framework 4.0. It is easy to create long running and distributed programs using WF with the right knowledge. With this book, you will discover that working with workflows is easy.

This book provides both step-by-step recipes and relevant background information. It covers all the important aspects of Windows Workflow Foundation 4.0. The best thing about this book is that all recipes are based on real-world experiences of Andrew Zhu. Andrew is a global WF and BizTalk technology support engineer for Microsoft. This book covers everything you need to know, when working with workflows. Get to grips with flow control activities, messaging, and transaction processes with easy to understand steps followed by explanations. You will quickly learn to use collection and custom WF activities and WF services.

You will see recipes that illustrate integration of Windows Workflow with other applications such as WPF, ASP.NET, WCF service.Lastly, you will discover how easily you can customize W4 Designer with WF rule engine and others.


Read More

Recommended for You

Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#
$ 13.50
Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications
$ 29.99
WCF 4.0 Multi-tier Services Development with LINQ to Entities
$ 29.99