예제 #1
0
        /// <summary>
        /// We know this is a <code>&lt;bpm-platform ../&gt;</code> element </summary>
        protected internal override void parseRootElement()
        {
            JobExecutorXmlImpl       jobExecutor    = new JobExecutorXmlImpl();
            IList <ProcessEngineXml> processEngines = new List <ProcessEngineXml>();

            foreach (Element element in rootElement.elements())
            {
                if (JOB_EXECUTOR.Equals(element.TagName))
                {
                    parseJobExecutor(element, jobExecutor);
                }
                else if (PROCESS_ENGINE.Equals(element.TagName))
                {
                    parseProcessEngine(element, processEngines);
                }
            }

            bpmPlatformXml = new BpmPlatformXmlImpl(jobExecutor, processEngines);
        }
예제 #2
0
        /// <summary>
        /// parse a <code>&lt;job-executor .../&gt;</code> element and add it to the list of parsed elements
        /// </summary>
        protected internal virtual void parseJobExecutor(Element element, JobExecutorXmlImpl jobExecutorXml)
        {
            IList <JobAcquisitionXml>    jobAcquisitions = new List <JobAcquisitionXml>();
            IDictionary <string, string> properties      = new Dictionary <string, string>();

            foreach (Element childElement in element.elements())
            {
                if (JOB_ACQUISITION.Equals(childElement.TagName))
                {
                    parseJobAcquisition(childElement, jobAcquisitions);
                }
                else if (PROPERTIES.Equals(childElement.TagName))
                {
                    parseProperties(childElement, properties);
                }
            }

            jobExecutorXml.JobAcquisitions = jobAcquisitions;
            jobExecutorXml.Properties      = properties;
        }