/// <summary> /// We know this is a <code><bpm-platform ../></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); }
/// <summary> /// we know this is a <code><process-application ... /></code> structure. /// </summary> protected internal override void parseRootElement() { IList <ProcessEngineXml> processEngines = new List <ProcessEngineXml>(); IList <ProcessArchiveXml> processArchives = new List <ProcessArchiveXml>(); foreach (Element element in rootElement.elements()) { if (PROCESS_ENGINE.Equals(element.TagName)) { parseProcessEngine(element, processEngines); } else if (PROCESS_ARCHIVE.Equals(element.TagName)) { parseProcessArchive(element, processArchives); } } processesXml = new ProcessesXmlImpl(processEngines, processArchives); }
/// <summary> /// parse a <code><process-archive .../></code> element and add it to the list of parsed elements /// </summary> protected internal virtual void parseProcessArchive(Element element, IList <ProcessArchiveXml> parsedProcessArchives) { ProcessArchiveXmlImpl processArchive = new ProcessArchiveXmlImpl(); processArchive.Name = element.attribute(NAME); processArchive.TenantId = element.attribute(TENANT_ID); IList <string> processResourceNames = new List <string>(); IDictionary <string, string> properties = new Dictionary <string, string>(); foreach (Element childElement in element.elements()) { if (PROCESS_ENGINE.Equals(childElement.TagName)) { processArchive.ProcessEngineName = childElement.Text; } else if (PROCESS.Equals(childElement.TagName) || RESOURCE.Equals(childElement.TagName)) { processResourceNames.Add(childElement.Text); } else if (PROPERTIES.Equals(childElement.TagName)) { parseProperties(childElement, properties); } } // set properties processArchive.Properties = properties; // add collected resource names. processArchive.ProcessResourceNames = processResourceNames; // add process archive to list of parsed archives. parsedProcessArchives.Add(processArchive); }