views:

429

answers:

1

Hi, I have a simple workflow with the HandleExternalEventAcitivity. The workflow ought to wait for the user to take an action, which in turn raises an event that the workflow activity handles.

Since it is an ASP.NET app, I am using the ManualWorkflowSchedulerService to have my workflow run synchronously. However with the ManualWorkflowSchedulerService the HandleExtenalEventActivity never fires. I did verify all of the attributes on the interfaces, events, event args of the service.

While investigating, I ran the workflow in the console app and as long as I am not using the ManualWorkflowSchedulerService, the events are being properly raised and handled.

Is there anything extra the HandleExternalEventActivity needs with the ManualWorkflowSchedulerService in place?

ANSWER: As pointed out by Jeremy, you must call the ManualWorkflowSchedulerService.RunWorkflow after an event is raised.

+1  A: 

After you raise the event into the workflow are you calling RunWorkflow on the scheduler again to enable further execution of your workflow?

Jeremy Wiebe
Thanks Jeremy! I ended up contacting Scott Allen (www.odetocode.com) and he pointed me in that same direction so I wanted to give him some credit too, although I doubt he will be ever reading this comment. Anyway, your answer stands and I have voted it up and marked it as the answer.
Tom