Receiving and replying to a WCF message

In this task, we will create a workflow with Receive and SendReply activities, and run a workflow as a WCF service. This workflow will accept two integer numbers and return their sum to the caller. We will use WCF Test Client to test the service.

How to do it...

  1. Create a workflow project:

    Create a new WCF Workflow Service Application project and name it ReceiveAndReply; refer to the following screenshot:

    How to do it...
  2. Create a workflow:

    Open the default created Service1.xamlx. We need to perform the following actions:

    1. Add two Int32 type WF4 Variables x and y to the Sequential Service scope.
    2. Click the View parameter… link ...

Get Microsoft Windows Workflow Foundation 4.0 Cookbook 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.