StringBuffer agentid = resolveVariable(getAttribute(attributes,"agentid"));
StringBuffer zipfile = resolveVariable(getAttribute(attributes,"zipfile"));
if (onlyIf(attributes)) {
setStatusText(sendzipNode.getNodeName()+" "+agentid);
printStream.println(sendzipNode.getNodeName()+" "+zipfile+" to agent "+agentid);
AgentInstance agentInstance = (AgentInstance)agentMap.get(agentid.toString());
if (agentInstance==null)
throw new Exception("unknown agentid "+agentid);
// send the zip file, and retrieve the associated zip ID
try {
properties.setProperty(agentid.toString()+zipfile.toString(),
agentInstance.ZIPSEND(zipfile.toString(),agentid.toString()+zipfile.toString()));
}
catch (Exception ex) {
printError(SENDZIP_NODE,"problem sending zip file to agent ("+ex.toString()+")");
}
}