protected static void addRemoteGroupPort(final Element parentElement, RemotePortSchema inputPort, String tagName) throws ConfigurationChangeException { try { final Document doc = parentElement.getOwnerDocument(); final Element element = doc.createElement(tagName); parentElement.appendChild(element); addTextElement(element, "id", inputPort.getId()); addTextElement(element, "name", inputPort.getName()); addPosition(element); addTextElement(element, "comments", inputPort.getComment()); addTextElement(element, "scheduledState", "RUNNING"); addTextElement(element, "maxConcurrentTasks", String.valueOf(inputPort.getMax_concurrent_tasks())); addTextElement(element, "useCompression", String.valueOf(inputPort.getUseCompression())); parentElement.appendChild(element); } catch (Exception e) { throw new ConfigurationChangeException("Failed to parse the config YAML while trying to add the input port of the Remote Process Group", e); } }