Exercise 2: Create the Expense Report Service

In this exercise, you set up the necessary infrastructure to enable communication between your Windows Forms application and your sequential workflow. This involves defining an interface marked with the ExternalDataExchangeAttribute and implementing that interface in your Windows Form class. To make communication between the Windows Form and the workflow easier, you use the ExternalDataExchangeService by adding the Windows Form class as a service that your workflow can access.

The first task in this exercise is to create two properties in the workflow. These properties enable you to pass parameters from the Windows Form application or to receive parameters from the workflow. In the second task, you define the service interface mentioned earlier and implement the methods that it contains in the Windows Form class.

In This Section

Task 1: Define the Workflow Parameters

Task 2: Define the IExpenseReportService Interface

See Also

Reference

ExternalDataExchangeAttribute
ExternalDataExchangeService

Concepts

Using Local Services in Workflows
Windows Workflow Foundation and Application Communication
Developing Windows Workflow Foundation Services

Copyright © 2007 by Microsoft Corporation. All rights reserved.
Last Published: 2010-03-04