private void StartWorkflowRuntime() { // Create a new Workflow Runtime for this application workflowRuntime = new WorkflowRuntime(); // Create EventHandlers for the WorkflowRuntime workflowRuntime.WorkflowTerminated += new EventHandler <WorkflowTerminatedEventArgs>(WorkflowRuntime_WorkflowTerminated); workflowRuntime.WorkflowCompleted += new EventHandler <WorkflowCompletedEventArgs>(WorkflowRuntime_WorkflowCompleted); workflowRuntime.WorkflowIdled += new EventHandler <WorkflowEventArgs>(workflowRuntime_WorkflowIdled); // Start the Workflow services workflowRuntime.StartRuntime(); // Add an instance of the External Data Exchange Service ExternalDataExchangeService externalDataExchangeService = new ExternalDataExchangeService(); workflowRuntime.AddService(externalDataExchangeService); // Add a new instance of the OrderService to the externalDataExchangeService speechService = new SpeechService(); externalDataExchangeService.AddService(speechService); // Subscribe to the menu text changed event speechService.PhoneTextChangedEventHandler += new SpeechService.UpdatePhoneTextEventHandler(UpdatePhoneTextEventHandler); }
private void StartWorkflowRuntime() { // Create a new Workflow Runtime for this application workflowRuntime = new WorkflowRuntime(); // Create EventHandlers for the WorkflowRuntime workflowRuntime.WorkflowTerminated += new EventHandler<WorkflowTerminatedEventArgs>(WorkflowRuntime_WorkflowTerminated); workflowRuntime.WorkflowCompleted += new EventHandler<WorkflowCompletedEventArgs>(WorkflowRuntime_WorkflowCompleted); workflowRuntime.WorkflowIdled += new EventHandler<WorkflowEventArgs>(workflowRuntime_WorkflowIdled); // Start the Workflow services workflowRuntime.StartRuntime(); // Add an instance of the External Data Exchange Service ExternalDataExchangeService externalDataExchangeService = new ExternalDataExchangeService(); workflowRuntime.AddService(externalDataExchangeService); // Add a new instance of the OrderService to the externalDataExchangeService speechService = new SpeechService(); externalDataExchangeService.AddService(speechService); // Subscribe to the menu text changed event speechService.PhoneTextChangedEventHandler += new SpeechService.UpdatePhoneTextEventHandler(UpdatePhoneTextEventHandler); }