Hi,
I got a NullReference problem using WWF and externaly raised events. The WWF state machine works together with a service instance raising events in the state machine to provide data and - of course - to change the state. While the "normal" operation works fine using events I got a strange problem.
To handle timeout scenarios I let the state initializer use a external timeout mechanism to register a callback in the menioned service. After the given time the callback function runs and shall raise the timeout event in the state machine. The events are defined like this:
event EventHandler<ExternalDataEventArgs> DeviceSysmapBrdcstTimeoutEvent;
and as mentioned work properly if not called from the timeout machanism. The ExternalDataEventArgs are created using valid Guids. The Excetion is raised accessing the delegate within the event:
System.Workflow.Activities.EventDeliveryFailedException was unhandled by user code
Message="Event \"DeviceSysmapBrdcstTimeoutEvent\" on interface type \"...\" for instance id \"efa3da3d-8546-4fcf-bc56-bbec04df6d69\" cannot be delivered."
Source="System.Workflow.Activities"
StackTrace:
at System.Workflow.Activities.WorkflowMessageEventHandler.EventHandler(Object sender, ExternalDataEventArgs eventArgs)
Anyone an idea? Thanks.