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

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

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