Completed State Machine Workflow Tutorial

Download sample

Note

The project files that are listed here contain the complete source code for Tutorial: Create a State Machine Workflow.

This tutorial shows how to use Windows Workflow Foundation to construct a state machine workflow.

Tutorial Overview

After you create the initial hosting application and state machine workflow, you create the IOrderingService interface in Task 2: Define the IOrderingService Interface. This interface is used by the host application and the state machine workflow to communicate with each other using various activities that are provided with Windows Workflow Foundation. The state machine workflow defines the interface that is then implemented by the host application.

After the IOrderingService interface is implemented in Task 3: Implement the IOrderingService Interface, the tutorial continues by defining the various states within the state machine workflow. The remaining tasks, Task 4: Define the WaitingForOrder State and Task 5: Define the OrderProcessing State, simulate an order-processing system by continually updating the status of the order with the host application. This is accomplished using the IOrderingService interface created earlier and the host communication activities in Windows Workflow Foundation.

See Also

Other Resources

HostCommunication Sample
Ordering State Machine
Simple State Machine

Copyright © 2007 by Microsoft Corporation. All rights reserved.
Last Published: 2010-03-04