try{
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
Document addOrderDocument = docBuilder.newDocument();
Element addOrderElement = addOrderDocument.createElement("add_order");
addOrderDocument.appendChild(addOrderElement);
addOrderElement.setAttribute("job_chain", supervisorJobChain);
Element paramsElement = addOrderDocument.createElement("params");
addOrderElement.appendChild(paramsElement);
addParam(paramsElement, "action", action);
addParam(paramsElement, "remote_scheduler_host", schedulerHost);