Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
DocumentCollection dc = agentContext.getUnprocessedDocuments();
Document doc = dc.getFirstDocument();
Database db = agentContext.getCurrentDatabase();
Agent agent = db.getAgent("mimpasswordsync");
while (doc != null) {
agent.runOnServer(doc.getNoteID());
System.out.println(doc.getNoteID());
doc = dc.getNextDocument(); }
} catch(Exception e) {
e.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.