Workflow TV - Lab Introduction to WF4: Exercise 4 - Dynamic Workflows with XAML

Sign in to queue

Description

 

In this exercise you will see how you can load a XAML file and create a dynamic activity from the XAML definition.  This allows you to load XAML at runtime and invoke it like you would do a script.

Intro To WF4 Hands On Lab (Visual Studio Gallery)
Intro To WF4 Hands On Lab (MSDN Code Gallery)

Lab Exercises

 

  • Exercise 1 - Hello Workflow (video)
  • Exercise 2 - Refactoring Workflow (video)
  • Exercise 3 - The CodeActivity (video)
  • Exercise 4 - Dynamic Workflows with XAML (video)
  • Exercise 5 – Testing Activities (video)
  • Exercise 6 – WorkflowApplication (video)
  • Exercise 7 – If/Else Logic (video)

Tag:

WF4

Embed

Download

Download this episode

The Discussion

  • User profile image
    malawto

    And at the end, after you've set your SayHello.xaml file properties -- you'll also want to change back Main in Program.cs:

     

      static void Main(string[] args)
            {
                WorkflowInvoker.Invoke(new SayHelloInCode());
            }

    From where it had been set in Task 4.2 to:

     

    static void Main(string[] args)
    {
        WorkflowInvoker.Invoke(ActivityXamlServices.Load("SayHello.xaml"));
        Console.ReadKey(false);
    }
    static void Main(string[] args)
            {
                WorkflowInvoker.Invoke(ActivityXamlServices.Load("SayHello.xaml"));
                Console.ReadKey(false);
            }

    I'm loving this series of videos and exercises... thanks!

  • User profile image
    rojacobs

    Actually you don't have to do this.  In Exercise 5 Task 6 we modify Main() to do something different.

Add Your 2 Cents