public TaskOrchestrationExecutor(OrchestrationRuntimeState orchestrationRuntimeState,
     TaskOrchestration taskOrchestration)
 {
     decisionScheduler = new SynchronousTaskScheduler();
     context = new TaskOrchestrationContext(orchestrationRuntimeState.OrchestrationInstance, decisionScheduler);
     this.orchestrationRuntimeState = orchestrationRuntimeState;
     this.taskOrchestration = taskOrchestration;
 }
 public TaskOrchestrationExecutor(OrchestrationRuntimeState orchestrationRuntimeState,
                                  TaskOrchestration taskOrchestration)
 {
     decisionScheduler = new SynchronousTaskScheduler();
     context           = new TaskOrchestrationContext(orchestrationRuntimeState.OrchestrationInstance, decisionScheduler);
     this.orchestrationRuntimeState = orchestrationRuntimeState;
     this.taskOrchestration         = taskOrchestration;
 }
Exemple #3
0
        internal virtual IEnumerable <OrchestratorAction> ExecuteOrchestration(OrchestrationRuntimeState runtimeState)
        {
            TaskOrchestration taskOrchestration = objectManager.GetObject(runtimeState.Name, runtimeState.Version);

            if (taskOrchestration == null)
            {
                throw TraceHelper.TraceExceptionInstance(TraceEventType.Error, runtimeState.OrchestrationInstance,
                                                         new TypeMissingException(string.Format("Orchestration not found: ({0}, {1})", runtimeState.Name,
                                                                                                runtimeState.Version)));
            }

            var taskOrchestrationExecutor = new TaskOrchestrationExecutor(runtimeState, taskOrchestration);
            IEnumerable <OrchestratorAction> decisions = taskOrchestrationExecutor.Execute();

            return(decisions);
        }