Cover by Christian Nagel, Daniel Kemper, Morgan Skinner, Jon Reid, Jacob Vibe Hammer, Karli Watson

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

O'Reilly logo

Chapter 26

Windows Workflow Foundation

WHAT YOU WILL LEARN IN THIS CHAPTER

  • What a workflow is and how to execute one
  • What an activity is
  • How to create custom activities
  • How to send an e-mail from an activity

Windows Workflow Foundation (WF) first appeared with .NET 3.0 and was revised with .NET 3.5 to add some functionality to integrate it with Windows Communication Foundation (WCF) more easily. In .NET 4, Workflow was completely rewritten; while the core concepts are the same as Workflow 3, the implementation is entirely different. This chapter covers Windows Workflow Foundation 4 and 4.5.

A simplified definition of a workflow is “a collection of activities,” but that’s not an entirely satisfying definition. It might be more useful to use an analogy instead.

When you’re writing a program, you use statements (such as if/else) and call functions (Console.WriteLine), and you might also execute some code within a loop. You can’t expect your end users to understand programming, so they tell you what they want the system to do, and you write the code to achieve those needs.

Now suppose for a moment that you could provide your end users with a vastly simplified programming environment, one in which you pre-build the statements and control flow logic, and all the end users need to do is plug these parts together to get what they want. That’s what Workflow can be used for. The statements and control logic are all called activities, and these can be plugged together into a workflow.

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