Creating a WF program using OutArgument

In this task, we will create a WF program that can return a result to the workflow host.

How to do it...

  1. Create a workflow project:

    Create a new Workflow Console Application under the Chapter01 solution; name the project as UseOutArgument.

  2. Author a workflow:

    Author the workflow shown in the following screenshot. Here are the detailed actions:

    1. Drag a Sequence activity from Toolbox to the designer panel.
    2. In the bottom of the designer panel, click the Arguments button, and click Create Argument to create an OutArgument string named OutMessage.
    3. Drag two WriteLine activities from Toolbox into the Sequence activity and fill the textboxes with "Start…" and "End" respectively.
    4. Drag an Assign activity from Toolbox to the ...

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.