Initializing a WF program using InArguments

In this task, we will create a WF program that accepts arguments when initialized in the WF host. In WF4, we can use InArguments to define the way data flows into an activity.

How to do it...

  1. Create a workflow project:

    Create a new Workflow Console Application under the Chapter01 solution. Name the project UseInArgument .

  2. Author the WF program:

    Create a workflow as shown in the following screenshot:

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

    Open the Program.cs file and change the host code as follows:

    using System.Activities; using System.Activities.Statements; namespace UseInArgument { class Program { static void Main(string[] ...

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.