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...
- Create a workflow project:
Create a new Workflow Console Application under the
Chapter01
solution; name the project asUseOutArgument
. - Author a workflow:
Author the workflow shown in the following screenshot. Here are the detailed actions:
- Drag a
Sequence
activity from Toolbox to the designer panel. - In the bottom of the designer panel, click the Arguments button, and click Create Argument to create an
OutArgument
string namedOutMessage
. - Drag two
WriteLine
activities from Toolbox into theSequence
activity and fill the textboxes with "Start…" and "End" respectively. - Drag an
Assign
activity from Toolbox to the ...
- Drag a
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.