O'Reilly logo

Microsoft Windows Workflow Foundation 4.0 Cookbook by Andrew Zhu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required