Exercise 3: Verification

  1. Press CTRL+F5 to run the workflow without debugging. The application should run in a console window and print the message “Hello Workflow 4 in code”.

    Figure 12

    The completed HelloWorkflow application

    Note:
    Why would I create a code activity?

    Writing business logic in code is nothing new. Why would you go to the effort to write it in a special class that inherits from CodeActivity? The reason is that by doing so now your business logic can be composed into other larger business processes that use the workflow runtime. As you will see later in the lab it will also benefit from a model for threading and data management that provides for highly scalable and long running business applications.

Next Step

Exercise 4: Dynamic Workflows with XAML