Using ExternalDataEventArgs

Earlier I mentioned that, to the host application, communications from the executing workflow appear as events. The host application can’t know beforehand precisely when the workflow instance will have data, and polling for data is terribly inefficient. So WF uses the asynchronous model that .NET itself uses and fires events when data is available. The host application hooks those events and reads the data.

Because we want to send information to the recipient of our event, we need to create a customized event argument class. If you’ve created a custom event argument class in your previous work, you probably used System.EventArgs as the base class.

WF external data events, however, require a different argument base class ...

Get Microsoft® Windows® Workflow Foundation Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.