예제 #1
0
        public void UpdateStep(Step step)
        {
            AtawDebug.AssertArgumentNull(step, "step", this);

            //if (CurrentStep != null)
            //    CurrentStep.Dispose();
            CurrentStep = step;
        }
예제 #2
0
        protected T GetStep <T>(Step step) where T : Step
        {
            AtawDebug.AssertArgumentNull(step, "step", this);

            T result = step as T;

            AtawDebug.AssertNotNull(result, string.Format(ObjectUtil.SysCulture,
                                                          "当前的Step类型必须{0},而现在却是{1}", typeof(T), step.GetType()), this);
            return(result);
        }
예제 #3
0
        public bool Back(string backStepName)
        {
            ManualStepConfig manualConfig = Config as ManualStepConfig;

            // var backStepName = string.Empty;
            if (manualConfig.HaveBack)
            {
                if (backStepName.IsAkEmpty())
                {
                    // 否则退到上一人工步骤,如果没有则报错
                    backStepName = WorkflowRow.WI_LAST_MANUAL;
                }
                AtawDebug.AssertNotNullOrEmpty(backStepName, string.Format(ObjectUtil.SysCulture,
                                                                           "人工步骤{0}没有可以回退的上一个人工步骤", manualConfig.Name), this);
            }

            StepConfig backStep = Config.Parent.Steps[backStepName];

            AtawDebug.AssertArgumentNull(backStep, string.Format(ObjectUtil.SysCulture,
                                                                 "指定的人工步骤{0} 不存在", backStepName), this);
            return(StepUtil.BackStep(Workflow, backStep));
        }
예제 #4
0
        public void UpdateState(State state)
        {
            AtawDebug.AssertArgumentNull(state, "state", this);

            CurrentState = state;
        }