Introduction to Workflow Services using .NET Framework 4

Version: 1.1.0

Description

This hands-on lab is intended to introduce developers to writing workflow services using .NET Framework 4. You will examine the different messaging activities of Windows Workflow, and learn how to configure them to create a distributed application. This lab is built around a specific HR business scenario where candidates submit their applications and are hired or rejected based on an evaluation process.

Overview

Windows Workflow Foundation (WF4) in .NET Framework 4 introduces a new way to create web services that combines the power of Windows Communication Foundation (WCF), and the flexibility of WF4. In this lab, you will learn how to use the WF4 messaging activities to implement an HR business workflow scenario. You will also experience the improved hosting, deployment, tracking and troubleshooting capabilities of the new Windows Server AppFabric.

Note:
Do I have to do all the exercises?

This lab is long. To do all of it will probably take close to 2 hours. The lab is designed so that each exercise can be done independently. Just open the solution found under the Begin folder for the exercise. For example, if you wanted to learn how Windows Server AppFabric makes it easier to deploy an application you would start with Exercise 5 and open the solution from the Source\Ex5 \Begin (choosing the folder that matches the language of your preference) folder.

Contoso has a business process for filling the open job requisitions in the company. The process will be divided in three tiers: a smart client application, a web site, a middle-tier workflow service, and a data layer.

  1. The applicant submits an application to a workflow service using a Windows Forms client app
  2. The workflow service screens the applicant’s education background by calling an Education service
  3. If the education screening passes, a human reviewer will receive an email with a link to the website to review the application
  4. The web site will call the workflow service to pass the result of the human review
  5. The applicant is notified by an email and a callback to the client application

Figure 1

Services Diagram for the lab solution

Objectives

In this Hands-On Lab, you will learn how to:

  • Use Messaging activities to send data in and out of workflows
  • Configure the Messaging activities for a specific scenario
  • Invoke Add Service Reference to create activities that consume another service
  • Utilize Activity Templates to create pre-configured request-reply patterns
  • Set up Content Based Correlation to correlate messages from the same client

System Requirements

You must have the following items to complete this lab:

  • Microsoft Visual Studio 2010 – Download
  • Microsoft .NET Framework 4 – Download
  • SQL Server 2008 Express (included with Visual Studio 2010) – Download
  • Microsoft Outlook or Windows Live Mail Client – Download
  • Windows Server AppFabric – Download using the Web Platform Installer – Donwload

Exercises

This Hands-On Lab comprises the following exercises:

  1. Submit Application Service
  2. Email Notification
  3. Applicant Screening
  4. Deploy the Solution
  5. Troubleshooting

Starting Materials

This Hands-On Lab includes the following starting materials.

  • Visual Studio solutions. Depending on the exercise you will find Visual Studio solutions that you can use as starting point for the exercises.
Note:
What if I get stuck?

The source code that accompanies this hands-on lab includes an end folder where you can find a Visual Studio solution with the code that you would obtain if you complete the steps in each exercise. You can use this solution as a guide if you need additional help working through the exercises.

Remember to build the solutions before opening any file using the workflow designer.

Next Step

Setup