if(once){
//Wenn ein Repeat-Intervall angegeben ist, nicht starten.
//Repeat f�r bestimmte Tage werden nicht ausgewertet.
SOSXMLXPath xpath = new SOSXMLXPath(new StringBuffer(xml));
SOSXMLXPath xpath_answer = new SOSXMLXPath(new StringBuffer(answer));
boolean start = true;
String nodeQuery = "//add_order[@at]";
Node runtime;
if (what.equals("order")){
Node atNode = xpath.selectSingleNode(nodeQuery);
nodeQuery = "//run_time";
runtime = xpath.selectSingleNode(nodeQuery);
if(atNode == null && runtime == null){
start = false;
getLog().debug1("handleOnce:" + name + " Once=yes. Order will not be modified because 'no at and no runtime' is given in <add_order>");
}
}
nodeQuery = "//run_time[@repeat]";
runtime = xpath.selectSingleNode(nodeQuery);
if(runtime != null){
start = false;
getLog().debug1("handleOnce:" + name + " Once=yes. "+what+" will not be modified because 'repeat' is given in <runtime>");
}
nodeQuery = "//run_time/period[@repeat]";
runtime = xpath.selectSingleNode(nodeQuery);
if(runtime != null && start){
start = false;
getLog().debug1("handleOnce:" + name + " Once=yes. "+what+" will not be startet because 'repeat' is given in <runtime>");
}
if(start){
String command = "";
if (what.equals("order")){
String job_chain = xpath.selectSingleNodeValue("//add_order/@job_chain");
String id = xpath_answer.selectSingleNodeValue("//spooler/answer/ok/order/@id");
command = "<modify_order at=\"now\" job_chain=\"" + job_chain + "\" order=\"" + id + "\"/>";
}
if (what.equals("job")){