Creating a WF program using InOutArgument

In this task, we will create a WF program using InOutArgument. This type of argument is used to receive values and is also used to pass values out to the caller (WF host).

How to do it…

  1. Create a workflow project:

    Create a new Workflow Console Application under the Chapter01 solution and name the project as UseInOutArgument.

  2. Author a workflow:

    Create an InOutArgument type argument: InOutMessage. Author a WF program as shown in the following screenshot. In the Assign activity textbox, type InOutMessage = "Now, I am an OutMessage".

    How to do it…
  3. Write code to host the workflow:

    Open the Program.cs file and alter the code as ...

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.