Chapter 45

Windows Workflow Foundation

WHAT’S IN THIS CHAPTER?

  • Learning the different types of workflows that you can create
  • Exploring descriptions of some of the built-in activities
  • Creating custom activities
  • Getting an overview of a workflow

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at http://www.wrox.com/remtitle.cgi?isbn=1118314425 on the Download Code tab. The code for this chapter is divided into the following major examples:

  • Hello World
  • Parallel Execution
  • Pick Demo
  • Custom Activities
  • Args and Vars
  • Workflow Application
  • Workflow as Services
  • Dynamic Update
  • Designer Hosting

A WORKFLOW OVERVIEW

This chapter presents an overview of the Windows Workflow Foundation 4.5 (referred to as WF and Workflow throughout the rest of this chapter), which provides a model to define and execute processes using a set of building blocks called activities. WF provides a Designer that, by default, is hosted within Visual Studio, which enables you to drag and drop activities from the toolbox onto the design surface to create a workflow template.

This template can then be executed in a number of different ways, as explained throughout the chapter. As a workflow executes, it may need to access the outside world, and there are a couple of methods typically used that enable you to do this. In addition, a workflow may need to save and restore its state, for example, when a long wait is needed.

A workflow is constructed from a number of activities, ...

Get Professional C# 2012 and .NET 4.5 now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.