Which code segment should you use?

You create a workflow host application by using Microsoft .NET Framework 3.5. You use Windows Workflow Foundation to create the application. You need to configure the workflow runtime to ensure that all the workflow instances run asynchronously. Which code segment should you use?

You create a workflow host application by using Microsoft .NET Framework 3.5. You use Windows Workflow Foundation to create the application. You need to configure the workflow runtime to ensure that all the workflow instances run asynchronously. Which code segment should you use?

A.
WorkflowRuntime runtime = new WorkflowRuntime();runtime.StartRuntime();WorkflowInstance instance = runtime.CreateWorkflow(typeof(CustomerWorkflow));instance.Start();

B.
WorkflowRuntime runtime = new
WorkflowRuntime();runtime.StartRuntime();ManualWorkflowSchedulerService scheduler = runtime.GetService<ManualWorkflowSchedulerService>();WorkflowInstance instance = runtime.CreateWorkflow(typeof(CustomerWorkflow));scheduler.RunWorkflow(instance.InstanceId);

C.
WorkflowRuntime runtime = new WorkflowRuntime();ManualWorkflowSchedulerService scheduler = new
ManualWorkflowSchedulerService();runtime.AddService(scheduler);runtime.StartRuntime();WorkflowInstance instance = runtime.CreateWorkflow(typeof(CustomerWorkflow));instance.Start();

D.
WorkflowRuntime runtime = new
WorkflowRuntime();runtime.StartRuntime();DefaultWorkflowSchedulerService scheduler = new DefaultWorkflowSchedulerService();runtime.AddService(scheduler);WorkflowInstance instance = runtime.CreateWorkflow(typeof(CustomerWorkflow));instance.Start();



Leave a Reply 0

Your email address will not be published. Required fields are marked *