Ejemplo n.º 1
0
        /// <summary>
        /// Recurse the scripts of a section; set Section.Success && _wfp.Sections.WorkflowSuccess
        /// </summary>
        /// <param name="section">The sectipon to process.</param>
        void ProcessSection(Section section, IConnectionSettings cs)
        {
            if (!section.HasScripts)  //nothing to do
            {
                section.Success = true;
                return;
            }

            OnStepProgress("ProcessSection", string.Format("Starting Section:{0}, Connection:{1}", section.Name, cs.ToString()));

            section.Success = true;
            RecurseScripts(section.Scripts, section, cs);
            if (!section.Success && section.FailWorkflowOnError)
            {
                //this is where a section will fail the workflow
                _wfp.Sections.WorkflowSuccess = false;
            }

            OnStepProgress("ProcessSection", string.Format("Finished Section:{0}, SectionSuccess:{1}, WorkflowSuccess:{2}",
                                                           section.Name, section.Success, _wfp.Sections.WorkflowSuccess));
        }