Delen via


Tutorial: Create a Custom WF Activity

Windows Workflow Foundation (WF) includes default activities that provide functionality for control flow, conditions, event handling, state management, and communication with applications and services. However, there are times when a custom activity is needed to implement specific behavior. The Windows Workflow Foundation framework is extensible by allowing the creation custom activities and including them in a workflow.

In this tutorial, you create a custom activity that has a property for a Web address that will be used to download the text from a Web page. The custom activity will be used in a workflow that is called from a Windows Form application. After entering the text in the address bar and clicking the button labeled Go, the workflow that contains the custom activity is started and the text from the Web page is retrieved and displayed.

To accomplish this in the first exercise, you create the project files and the Windows Form application that will be the host for the workflow that contains the custom activity. In the second exercise, you create the custom activity and the workflow that uses it. Finally, you update the Windows Form application to host the workflow runtime, run the workflow, and display the final results.

In This Section

Exercise 1: Create the Custom Activity Project

Exercise 2: Create the Custom Activity and Workflow

Completed Custom Activity Tutorial

See Also

Other Resources

Developing Windows Workflow Foundation Activities

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