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

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

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