コード例 #1
0
        private void LoadWorkflow(IWorkflowBuilder <TModel> builder)
        {
            WorkDefine.Workflow wf = null;
            if (this.WorkflowManager != null)
            {
                wf = this.WorkflowManager.WorkFlow;
            }
            else
            {
                wf = this.ImplementationManager.GetWorkflow(builder);
                this.WorkflowManager = new WorkflowManager(wf, this.Configuration);
            }

            if (RunManager == null)
            {
                RunManager = new RunManager(this.Configuration.Convention, wf.Id);
            }
            else
            {
                this.RunManager.WorkflowId = wf.Id;
            }

            this.ValidationContainer = ValidationContainer.CreateValidationContainer();

            if (this.preOverrides.Count() > 0)
            {
                this.preOverrides.ForEach(o =>
                {
                    ((IValidationContainer)this.ValidationContainer).AddOverride(o.Key, o.Comment, o.AuditCode);
                });
            }

            this.WorkflowCache = this.Configuration.Cache.Spawn(wf.Id);
        }
コード例 #2
0
        //defer is called during the execution of an IAction
        void IEngineScope <TModel> .Defer(IDeferredAction <TModel> action, bool onlyIfValidationsResolved)
        {
            string key = RunManager.GetDeferralId();

            if (onlyIfValidationsResolved)
            {
                this.finalize.Add(key, action);
            }
            else
            {
                this.finalizeAlways.Add(key, action);
            }
        }
コード例 #3
0
 internal Engine(Config config, RunManager runManager) : this(config)
 {
     this.RunManager = runManager;
 }