Chapter 27. 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 extra functionality to integrate it with Windows Communication Foundation (WCF) more easily. In .NET 4, Workflow has been completely rewritten; while the core concepts are the same, the implementation is entirely different. This chapter covers Windows Workflow Foundation 4 (WF4).
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 no doubt 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 4 can be used for. The statements and control logic are all called activities, and these can be plugged together into a workflow.
HELLO WORLD
Every programming ...
Get Beginning Visual C# 2010 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.