O'Reilly logo

Professional C# 4 and .NET 4 by Morgan Skinner, Karli Watson, Jay Glynn, Bill Evjen, Christian Nagel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 44. Windows Workflow Foundation 4

WHAT'S IN THIS CHAPTER?

  • The different types of workflows that can be created

  • A description of some of the built-in activities

  • How to create custom activities

  • Overview of a workflow

This chapter presents an overview of the Windows Workflow Foundation 4 (referred to as Workflow 4 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, and that allows 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, which we explain throughout the chapter. As a workflow executes, it may need to access the outside world, and there are a couple of methods that are typically used that allow 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, and these activities are executed at runtime. An activity might send an e-mail, update a row in a database, or execute a transaction on a back-end system. There are a number of built-in activities that can be used for general-purpose work, and you can also create your own custom activities and plug these into the workflow as necessary.

With Visual Studio 2010, there are now effectively two versions of Workflow — the 3.x version, which ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required