Tutorial: Create a Custom Activity 

Windows Workflow Foundation includes a default set of activities that provide functionality for control flow, conditions, event handling, state management, and communication with applications and services. However, there are times when an 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 are going to be creating a custom activity that has a property for a web address that will be used to download the text from a webpage. 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 containing the custom activity is started and the text from the webpage is retrieved and displayed.

To accomplish this in the first exercise you will be creating the project files and the Windows Form application that will be the host for the workflow containing the custom activity. In the other exercise you will be creating the custom activity and the workflow that uses it. Finally, you will 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 Workflow Activities

Footer image

Send comments about this topic to Microsoft.