Part 1 Part 2 In my previous post I demonstrated how to keep multiple versions of an assembly around and how to use the assemblyBinding element in the app.config to let the runtime load multiple versions of a worklfow. In the end we had both workflows, the first in assembly 1.0.0.0 and the second in assembly 2.0.0.0, running and life seemed to be good So is there more to write on the subject? Yes unfortunately there are still some potential problems that need to be addressed . The pitfalls of External Data Exchange Lets take a look at what happens if we add a HandleExternalEventActivity to the mix. This HandleExternalEventActivity can be used to have a workflow react to input from an external data exchange service, sometimes called local communication. Lets change the workflow to reflect the following: In this workflow I am waiting for either a DelayActivity to fire or an event to be raised from an external service. Like before the activities are emended in a permanent loop so the workflow is never finished. I have kept the external data exchange service real simple. The interface looks like this: using System; using System.Workflow.Activities; namespace WorkflowLibrary1 { [ ExternalDataExchange ] public interface IMyService { event EventHandler < MyEventArgs > TheEvent; } } The implementation like this: using System; namespace WorkflowLibrary1 { public class MyService : IMyService { public event EventHandler < MyEventArgs > TheEvent; public void OnTheEvent( Guid instanceId)
Read More...