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

Download this episode

Download Video

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

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    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.

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.