O'Reilly logo

Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C# by K. Scott Allen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Activity Composition

Let's return to the bug-tracking workflow we used in Chapter 4 to see if a custom activity can help us in building a bug-tracking application. The bug-tracking workflow is needed to request additional documentation for a bug. To request this documentation, the workflow communicates with a local service we built in Chapter 4 that implements the following interface:

[ExternalDataExchange]
interface IBugService
{
bool RequestUpload(Guid id, string userName);
event EventHandler<UploadCompletedEventArgs> UploadCompleted;
}

A workflow that needs documentation would first use a CallExternalMethod activity to invoke the RequestUpload method. Immediately afterwards, the workflow would use a HandleExternalEvent activity to wait for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required