In this lab, you will learn how to build workflows using Windows Workflow Foundation (WF4) and the State Machine activity. 

Getting Started

  1. Download and unzip the lab
  2. Install the pre-requisites
  3. Open the StateMachine.HOL.docx lab manual and start working through the exercises

Get Microsoft Silverlight
Download video


What is a State Machine?

"It is a behavior model composed of a finite number of states, transitions between those states, and actions, similar to a flow graph in which one can inspect the way logic runs when certain conditions are met." - Wikipedia – Finite State Machine

In Windows Workflow Foundation (WF4) a State Machine is a workflow activity that is best for scenarios where the workflow responds to events outside of itself.  Throughout this lab, you will implement a State Machine that will direct the flow of the user interface for an Automated Teller Machine (ATM).  The UI designers have done their analysis and come up with a set of scenarios that you will implement using the State Machine activity.

 The lab also includes pre-written code that implements a WPF UI using the Model-View-ViewModel pattern and unit tests to verify the behavior of the State Machine.  Feel free to explore the Solution to learn how you can implement this pattern in your applications.



This lab assumes basic knowledge of Windows Workflow Foundation (WF4).  If you are new to WF4, we suggest you complete the Introduction to WF4 Hands on Lab prior to this lab.

System Requirements

You must have the following items to complete this lab:

Starting Materials

This Hands-On Lab includes the following starting materials.

Update History