WorkflowInstanceID
Any suggestions?
Amanda
Any suggestions?
Amanda
What I have right now is a state based workflow which at some state executes an external sequential workflow. When it creates this sequential workflow, it subscribes to the runtime's (obtained via a WorkflowHostingService service) workflow completed event. When this event is fired, it checks to see if the InstanceId of the event matches that of the sequential workflow it just executed. If it matches, then it fires another event. It is this second event that my workflow state is listening for (and when it receives it, it should transition to the next state). This event though, as it extends ExternalDataEventArgs needs an InstanceId.
Is there a better way of doing this?
Thanks.
Amanda
If I understand what you are doing correctly - you are trying to execute a sequential workflow and then have it fire an event to another workflow. What you want to do is pass the guid of the statemachineworkflow as a parameter to the sequential workflow - and extract it from the OutputParameters property of WorkflowCompletedEventArgs.
I am pretty sure though you don't want to this this way. You don't want a statemachineworkflow subscribing to an event of the WorkflowRuntime. You can implement this all using a Host level service.
Matt
I uploaded a simple example to http://www.masteringbiztalk.com/blogs/jon/content/binary/HostEventExample.zip