I’m having a problem with a java scheduled agent which processes documents in a view. It sometimes skips documents or processes new documents before old ones. The view is sorted ascending by Request Number which is the order in which we would like them to be processed. I just took over this app and we recently upgraded the server to ND 6.5 but the developer before me says this was not a problem on R 5.09a.Is anyone aware of a problem with java on ND6.5?
There’s alot of code but here’s some of the major lines:
int numberOfMessages=0;
processView = db.getView(“(ToBeProcessed)”);
processView.setAutoUpdate(false);
doc=processView.getFirstDocument();
while ((doc !=null) && (numberOfMessages < maxCtr)) {
holdDoc=processView.getNextDocument(doc);
numberOfMessages=numberOfMessages+1;
if (reqStatus.equals(“Resend”)) {
doc.replaceItemValue("RequestStatus","ReProcessed");
} else {
doc.replaceItemValue("RequestStatus","Processed");
}
doc.save(true);
doc=holdDoc;
} // end while