Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#
上QQ阅读APP看书,第一时间看更新

Chapter 2. Authoring Workflows

The workflow designer hosted in Visual Studio 2005 makes workflow design a drag-and-drop operation. In this chapter, we will build a workflow with the designer, and then take a detailed look at what happens behind the scenes. Ultimately, the workflow definition we see in the designer becomes a type in a .NET assembly. Because Windows Workflow is flexible, there are several paths available for the workflow to journey from designer to compiled type.

One approach is to author our workflows using a purely declarative style (using only XAML). We can also author workflows using a purely imperative style (using only C# or Visual Basic code). Finally, we can use a combination of XAML and code.

When a workflow is executing, these different approaches won't have a noticeable impact. When we are building workflows, however, the authoring styles offer various strengths and weaknesses we can align with our needs. We will examine the pros and cons of the available approaches and see how a workflow moves from design to executable instructions.