Long Running Activity example

In the Windows Workflow Foundation hands on labs there is an example of an activity which takes a lot of processing power. It's in Lab 5 Exercise 4 in the WF Beta 2 HOLs. The mechanism used is to have a CallExternalMethod activity followed by a HandleExternalEvent activity. The action requiring processor time is executed on a separate thread.

In this sample activity only one activity is required which starts the work and also waits for it to finish by returning the ActivityExecutionStatus.Executing state from the activity.

Download it here.