tstojecki
tstojecki

Reputation: 1520

Handle external events in WF with ManualWorkflowSchedulerService

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.

Upvotes: 0

Views: 786

Answers (1)

Jeremy Wiebe
Jeremy Wiebe

Reputation: 3963

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

Upvotes: 1

Related Questions