Simple Sequential Workflow Sample
This sample uses the Windows Workflow Foundation component model to construct a simple purchase order (PO) approval workflow with a single IfElseActivity activity and two IfElseBranchActivity activities. Each branch contains a CodeActivity activity that writes to the console whether the order was approved or rejected. The IfElseActivity activity uses a code condition to evaluate which branch to take. In this sample, the condition always returns true. Therefore, the first branch is always taken and the program reports that all orders are approved.
To build the sample
Download the sample by clicking Download Sample.
This extracts the sample project to your local hard disk.
Click Start, point to Programs, point to Microsoft Windows SDK, and then click CMD Shell.
Go to the source directory of the sample.
At the command prompt, type MSBUILD <Solution file name>.
To run the sample
- In the SDK Command Prompt window, run the .exe file in the SimpleSequentialWorkflow\bin\debug folder (or the SimpleSequentialWorkflow\bin folder for the Visual Basic version of the sample), which is located below the main folder for the sample.
Creating a Sequential Workflow
Workflow with Parameters Sample
Tutorial: Create a Sequential Workflow
Using the IfElseActivity Activity
Using the IfElseBranchActivity Activity
Basic Workflows Samples
Windows Workflow Foundation Samples
© 2007 Microsoft Corporation. All rights reserved.