use of org.activiti.bpmn.converter.child.ExecutionListenerParser in project Activiti by Activiti.
the class ExtensionElementsParser method parse.
public void parse(XMLStreamReader xtr, List<SubProcess> activeSubProcessList, Process activeProcess, BpmnModel model) throws Exception {
BaseElement parentElement = null;
if (!activeSubProcessList.isEmpty()) {
parentElement = activeSubProcessList.get(activeSubProcessList.size() - 1);
} else {
parentElement = activeProcess;
}
boolean readyWithChildElements = false;
while (readyWithChildElements == false && xtr.hasNext()) {
xtr.next();
if (xtr.isStartElement()) {
if (ELEMENT_EXECUTION_LISTENER.equals(xtr.getLocalName())) {
new ExecutionListenerParser().parseChildElement(xtr, parentElement, model);
} else if (ELEMENT_EVENT_LISTENER.equals(xtr.getLocalName())) {
new ActivitiEventListenerParser().parseChildElement(xtr, parentElement, model);
} else if (ELEMENT_POTENTIAL_STARTER.equals(xtr.getLocalName())) {
new PotentialStarterParser().parse(xtr, activeProcess);
} else {
ExtensionElement extensionElement = BpmnXMLUtil.parseExtensionElement(xtr);
parentElement.addExtensionElement(extensionElement);
}
} else if (xtr.isEndElement()) {
if (ELEMENT_EXTENSIONS.equals(xtr.getLocalName())) {
readyWithChildElements = true;
}
}
}
}
Aggregations