Windows Workflow Foundation Samples
The samples in this section cover a wide range of technology areas in Windows Workflow Foundation. The technology samples focus on key areas of Windows Workflow Foundation, whereas the application samples demonstrate a variety of Windows Workflow Foundation features through the use of complete applications.
In This Section
Application Samples
The Application samples represent complete applications that are written for Windows Workflow Foundation that demonstrate the use of several technologies.
Sample | Description |
---|---|
Demonstrates how to create a state machine workflow that implements an order-processing system. |
|
Demonstrates how to host the Windows Workflow Foundation Visual Studio designer to create an application that generates rules for Microsoft Office Outlook. |
|
Demonstrates how to create a state machine workflow that implements a speech-driven menu application. |
|
Demonstrates how to create a custom tracking service to track workflow terminations. |
|
Enables you to visually create a tracking profile. This tracking profile can then be saved to a file or a database in SQL Server. |
|
Provides a tool that lets you see the progress of a workflow instance. It uses the SqlTrackingService to gather the current status of the workflow and activities, and it uses the rehostable workflow designer to show progress. |
|
Provides an extensible tool for extracting workflow-related information from an assembly. Each workflow's hierarchy, declarative rules, and required local services are displayed in a tree view. This allows for easy browsing of the compiled workflow's structure. |
Technology Samples
The Technology samples demonstrate specific technologies of Windows Workflow Foundation. They are categorized based on their technology features.
Category | Sample | Description |
---|---|---|
Illustrates how to use nested exception handlers in a workflow to catch and handle specific exception types at different stages in the workflow. |
||
Demonstrates the use of the DelayActivity activity. |
||
Demonstrates the use of two parallel sequential code activities within a while loop activity. |
||
Demonstrates the use of the two basic activities, SuspendActivity and TerminateActivity. |
||
Demonstrates a simple use of the ReplicatorActivity activity. |
||
Provides a simple implementation of a ConditionedActivityGroup (CAG) activity. |
||
Demonstrates how to author a workflow that synchronizes access to shared resources. |
||
Illustrates how to use the Throw activity, which enables you to model and throw an exception from a workflow. It also shows how to catch the exception in the hosting application. |
||
Demonstrates how to author compensation in a workflow. |
||
Shows how to create a workflow that uses the PolicyActivity to implement a discount workflow. |
||
Builds on the Simple Policy Sample sample to show more advanced capabilities available with a RuleSet. |
||
Shows how to use a State Initialization activity. |
||
Includes a workflow that has a custom activity property that is bound to a workflow property. |
||
Illustrates how to build and execute a "hello world" workflow by using a command-line host. |
||
Demonstrates the use of state machine workflow. |
||
Shows how to build a simple sequential workflow using IN and OUT parameters. The sample is nearly identical to the Simple Sequential Workflow Sample sample, except the IN parameter is evaluated by the code condition in the IfElseActivity activity, and the order status is stored in an OUT parameter. |
||
Demonstrates how Web services can be invoked from the workflow and how a workflow can be published as a Web service. |
||
Introduces the ListenActivity activity, which is a composite activity that blocks and waits for one of n child branches to occur. Each child branch is a sequence with a blocking activity as a first step. Exactly one of the branches of a ListenActivityactivity will execute. |
||
Demonstrates the use of correlation attributes with local services to raise correlated events to a workflow instance. |
||
Illustrates the use of queues to send data into a workflow. |
||
Demonstrates the communication with the workflow host application using a local service. |
||
Demonstrates how to move between states using HandleExternalEventActivity activities. |
||
Illustrates how to add properties and handlers to a custom activity. |
||
Illustrates how to add a custom configuration error and a custom context menu to the designer associated with an activity. |
||
Illustrates the creation of a custom activity that can be used to send mail using the Simple Mail Transport Protocol (SMTP). |
||
Illustrates the creation of an activity that can be used to listen for file system events. It shows the use of queues in the development of an activity that listens for file system events, such as the creation of a file in a specific folder. |
||
Shows how the workflow designer can be re-hosted in a Windows application. The goal of this sample is to show how a separate development environment/execution environment can be created outside of Visual Studio. |
||
Demonstrates how to dynamically update a workflow instance when it is running from inside the workflow (code-beside). |
||
Demonstrates how to dynamically change a rule condition from the host program. |
||
Demonstrates how to dynamically update a workflow instance from outside the workflow, for example, the host program. |
||
Demonstrates the engine unloading a workflow by saving the workflow instance state through a custom persistence service, when the workflow waits during a Delay activity. |
||
Demonstrates a document-approval scenario in which the workflow is unloaded from memory when it is idle and loaded back into memory upon event arrival. |
||
Illustrates how to use the SqlWorkflowPersistenceService service, and how workflow instances are loaded and unloaded to and from memory by the application and the workflow runtime. |
||
Demonstrates how to exit a workflow that is waiting for an external event that will never occur. |
||
Shows the differences between running a workflow using the Manual Threading model and the default CLR threading model, and demonstrates the threading impact of using the DelayActivity activity in a workflow. |
||
Shows how to reload a persisted workflow using a Windows Forms sample. |
||
Shows how to load a workflow code file at run time. |
||
Shows how to use a simple sequential workflow created as markup. |
||
Shows how to use a simple state machine workflow created as markup. |
||
Shows how to serialize and reload a programmatically created workflow. |
||
Shows how to serialize advanced data types. |
||
Demonstrates the use of the ActiveDirectory roles in workflows. |
||
Demonstrates the use of the ASP roles in workflows. |
||
Shows the use of a rule condition with an IfElseActivity activity. |
||
Illustrates the use of the SQL tracking service to track workflow events. |
||
Illustrates the use of the SQL tracking service to track workflow events using a custom tracking profile. |
||
Illustrates the use of the SQL tracking service to track workflow events using user track points. |
||
Illustrates the use of the SQL tracking service to track workflow TrackingWorkflowTerminatedEventArgs, TrackingWorkflowSuspendedEventArgs, and TrackingWorkflowExceptionEventArgs. |
||
Shows how to create a tracking service and write the contents of tracked data to the console. |
||
Demonstrates how you can use tracking to determine rule actions in your workflow. |
||
Illustrates how you can create a simple file-based tracking service that reads and writes TrackingProfile data to an XML file. |
||
Shows how to create, serialize, and deserialize TrackingProfile data using the Tracking Profile Object Model. |
||
Shows how to partition tracking data for ease in data archiving. |
||
Illustrates how to create a custom service and have it participate in the same transaction as that of the workflow from which the service is invoked. |
© 2007 Microsoft Corporation. All rights reserved.