use of org.kie.dmn.model.v1_1.Decision in project drools by kiegroup.
the class DecisionServiceConverter method parseElements.
@Override
protected void parseElements(HierarchicalStreamReader reader, UnmarshallingContext context, Object parent) {
while (reader.hasMoreChildren()) {
reader.moveDown();
Object object = null;
String nodeName = reader.getNodeName();
if (nodeName.equals(INPUT_DATA)) {
// Patch because the tag name inputData is used in both decision services and as a DRG Element
DMNElementReference ref = new TDMNElementReference();
ref.setHref(reader.getAttribute("href"));
object = ref;
} else {
// Default behaviour
object = readItem(reader, context, null);
}
if (object instanceof DMNModelInstrumentedBase) {
((KieDMNModelInstrumentedBase) object).setParent((KieDMNModelInstrumentedBase) parent);
((KieDMNModelInstrumentedBase) parent).addChildren((KieDMNModelInstrumentedBase) object);
}
reader.moveUp();
assignChildElement(parent, nodeName, object);
}
}
Aggregations