4156. Windows Workflow Foundation Using C#
Microsoft’s Windows Workflow Foundation (WF) provides a framework for creating scalable applications consisting of independent program units called activities. WF 4 is a major rewrite of this technology, offering significantly higher performance and making it easier to create and execute workflow applications. This course covers the latest version of WF, including new features such as state machine activities introduced with .NET Framework 4 Platform Update 1. The course uses Visual Studio 2010, which provides a visual Designer for creating workflows.
The course begins with an overview of the concepts of workflow and the programming model provided by WF. The essentials of WF programming are then covered followed by a systematic treatment of the major features of WF, including the Built-In Activity Library. Primitive and control flow activities are discussed, and the alternatives to hosting workflows are covered. Collection and parallel activities are covered. The creation of custom activities, both using the Designer and code, is explained. Flowchart and state machine activities are covered. Persistence and bookmarks are discussed. Workflow Services, using Windows Communication Foundation (WCF) is covered. The course concludes with a discussion of debugging, error handling, transactions and compensation.
Numerous programming examples and exercises are provided. The student will receive a complete set of notes and all the programming examples.
· Understand the concept of workflow and the architecture of WF
· Implement workflow applications using WF
· Use standard activities from the Built-In Activity Library
· Implement custom activities for workflow applications
· Provide hosting for workflow applications
· Implement persistence in workflow applications
· Implement and consume workflow services
· Debug workflow applications
· Handle errors and perform compensation in workflow applications
Prerequisites: The student should have programming experience in C# and version 4.0 of the .NET Framework and be familiar with the Visual Studio 2010 development environment.
1. Workflow Foundation Conceptual Overview
What is Workflow?
Windows Workflow Foundation
A Workflow Business Scenario
Workflow Foundation 3
Workflow Foundation 4
2. Getting Started with WF 4
Visual Studio Workflow Projects
Workflows in Code
Workflows in XAML
Variables, Arguments and Expressions
3. Primitive and Control Flow Activities
While and DoWhile
4. Custom Activities
Why Custom Activities
Activity Class Hierarchy
5. Workflow Hosting
Canceling and Aborting a Workflow
Terminating a Workflow
Workflows in a Windows Application
Workflows in ASP.NET
6. Collection and Parallel Activities
7. More about Custom Activities
Waiting for Input
8. Flowchart and State Machine
Flowchart Activity Designers
States and Transitions
State Machine Activity Designers
Persistence and Bookmarks
Persistence Store in SQL Server
Unloading and Loading
Serializing Instance Identification
10. Workflow Services
What is WCF?
Address, Binding and Contract
Exposing a Workflow as a Service
Calling a Service from a Workflow
Hosting using WorkflowServiceHost
11. Debugging and Error Handling
Breakpoints in Activities
Handling Exceptions in the Host
Handling Exceptions in the Workflow
Required software is Visual Studio 2010 Professional Edition or higher with Service Pack 1 for Visual Studio 2010. The operating system may be Windows XP, Windows Vista or Windows 7. Microsoft .NET Framework 4 Platform Update 1 – Design-time Package for Visual Studio 2010 SP1 should also be installed. See the course Setup Notes for details.
A good minimal hardware profile for this course would have a 2 GHz or better CPU, 1 GB of RAM, and at least 4 GB of free disk space for tools installation and courseware.