protected void NextStepAction(string input, Step lastExecuted) { var lastExecutedStepHandlerType = lastExecuted._configuration.StepHandlerType; //Do works to do after last step is executed. if (lastExecutedStepHandlerType != null) { var handler = Activator.CreateInstance(lastExecutedStepHandlerType); lastExecutedStepHandlerType.GetMethod("AfterStepExecuted").Invoke(handler, new object[] { lastExecuted._configuration.StepHandlerParameter }); } //Eğer input'a gerek yoksa, next step'e inputsuz karar verebilmeli, ve sadece tek bir nextStep'i olmalı. var stepToExcecute = StepContainer.GetNextStepBySelectionKey(_configuration, input); if (stepToExcecute == null) { _output.Write(" [!] Next step cannot found. Please check your input."); lastExecuted.Execute(skipHandler: true); return; } stepToExcecute.Execute(); }
public static void StartProcessFlow(string initialStepName) { var initialStepToExecute = StepContainer.GetStepByName(initialStepName); initialStepToExecute.Execute(); }