Chapter 6. Exception Handling

In this chapter, you'll add logic to verify that each of the order items is in stock. To do that, you'll iterate through each of the order items in the same way as you did in the previous chapter. If an item is out of stock, you'll throw an exception, which will be caught by your workflow.

Reusing the Chapter 5 Project

Start Visual Studio 2010 and create a new project. Choose the Blank Solution template, as shown in Figure 6-1. Enter the solution name as Chapter06.

Creating a blank solution

Figure 6-1. Creating a blank solution

Next, copy the OrderProcess subfolder from the Chapter05 folder to the Chapter06 folder. In the Solution Explorer, right-click ...

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.