queryObjectName = getMessageObject().getName();
logger.info("Query object name is: " + queryObjectName);
}
try {
// build the query object from the contents of the message (QueryFilter)
XmlEnterpriseObject xeo = (XmlEnterpriseObject)getExecutorAppConfig().getObject(queryObjectName + "." + generateRelease(getMessageRelease()));
xeo.buildObjectFromInput(getMessageObject());
// query for all jobs that match criteria passed in
java.util.List listOfJeos = query((LightweightPerson)xeo, getMessageObjectName(), getMessageRelease());
if (listOfJeos.size() > 0) {
logger.info("Adding " + listOfJeos.size() + " " +
getMessageObjectName() + " objects to the Provide-Reply document.");
// remove DataArea from primed provide reply document.
replyDoc.getRootElement().
getChild(DATA_AREA).
removeChildren(getMessageObjectName());
// add an Element to the provide document for each XmlEnterpriseObjectImpl stored in the List
logger.info("Building reply document...");
for (int j=0; j<listOfJeos.size(); j++) {
XmlEnterpriseObject x = (XmlEnterpriseObject)listOfJeos.get(j);
// Put the Element in the reply document...
Element eOutput = null;
EnterpriseLayoutManager outElm = x.getOutputLayoutManager("xml");
x.setOutputLayoutManager(outElm);
eOutput = (Element)x.buildOutputFromObject();
replyDoc.getRootElement().
getChild(DATA_AREA).
addContent(eOutput);
}