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 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.