Formatting messages in Workflow Services

This sample shows how different user types can be used in messaging activities (WF services). The sample service is a simple expense approval service and exposes three operations. ApproveExpense takes a data contract type and shows how to use known types. The operation returns true or false based on the expense amount. ApprovePO takes an XmlSerializer type and returns true or false based on the expense amount.ApprovedVendor takes a message contract type and returns true or false if the vendor is in the list of approved vendors or if the request came from the finance department (the finance department can use any vendor).

To use this sample

  1. Load the project solution in Visual Studio 2010 and build the project.

  2. First run the service, generated in [solution base directory]\FormatterService\bin\debug\

  3. Second, run the Client application generated in [solution base directory]\FormatterClient\bin\debug.

  4. The client calls three operations on the service and prints the results. When complete, press ENTER to exit the client and then the service.


The samples may already be installed on your machine. Check for the following (default) directory before continuing.


If this directory does not exist, go to Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Samples for .NET Framework 4 to download all Windows Communication Foundation (WCF) and WF samples. This sample is located in the following directory.