Chapter 2. Coded Workflows

In Chapter 1, you implemented a fairly simple workflow using the workflow designer. Now you'll implement the same workflow using code instead. Any workflow can be implemented in code or with the designer; the choice is simply a matter of preference. However, implementing a workflow in code will help you gain a better sense of how workflow works.

Creating a Console Application

To start, create a simple console application (do not use a workflow template), as shown in Figure 2-1.

Creating a console application

Figure 2-1. Creating a console application

Add a reference to System.Activities. This will enable you to use the workflow activities in your application. ...

Get Beginning WF: Windows Workflow in .NET 4.0 now with O’Reilly online learning.

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