Domino AgentRunner can be used to build, run, and debug Domino agents in VisualAge for Java. AgentRunner uses a set of debug classes that access Notes context information so that you can run an agent in the IDE.
To use AgentRunner, follow these steps:
To set up your Domino 5.0 environment to support AgentRunner, set the PATH environment variable to point to the Domino directory.
To set up your Domino 4.6 environment to support AgentRunner, follow these steps:
JavaUserClasses=X:\IBMVJava\eab\runtime30\domino\ar\IVJAgentRunner.jar
X:\IBMVJava is the path where VisualAge for Java is installed. After you have edited the notes.ini file, you must shut down Domino and restart it so that your changes take effect.
Your Domino environment is now set up to support AgentRunner. Next, set up your VisualAge for Java environment.
To set up your VisualAge for Java IDE to use AgentRunner, add the Domino Java class library from the repository to your workspace:
You now should see the Domino Java class library on the All Projects view of the Workbench window. This project contains a package of Java classes (called lotus.notes) for the appropriate version of Notes Object Interface/Domino, plus additional debug classes that support AgentRunner.
You can now use these classes when running or debugging an agent in the IDE. Next, import from Domino or create an agent in VisualAge for Java.
In the Workbench, create a project called Domino Agents.
Importing an agent from Domino
The imported Java code is compiled and any unresolved problems are added to the All Problems page. Your .java file appears as in a package in your Domino Agents project in the Workbench.
public class ... extends AgentBase
to
public class ... extends DebugAgentBase
Creating a new agent
For Domino 5.0, see Domino 5 Designer Help. For Domino 4.6, see the Java Programmer's Guide for Lotus Notes.
Next, generate your AgentContext document in a Notes database.
For Domino 5.0, perform these steps:
For Domino 4.6, perform these steps:
The AgentContext document is automatically generated in AgentRunner.nsf when you run your agent from a class that extends DebugAgentBase. A call to getSession() will, after generating an AgentContext document, return null.
You are now ready to debug your agent.
When you have generated an AgentContext document, you are ready to debug it in VisualAge for Java.
You have two options:
The default is either the last AgentContext that you ran or the last one that you saved. If you have set any breakpoints or have errors in your code, the Debugger window opens so you can step through your code. See the online help for more information on using the debugger.
You can change the Agent Runs on and Search Criteria fields to generate the UnprocessedDocuments collection that you would like to use for debugging purposes. You must supply this information because it cannot be determined from running the agent.
When development of the agent is complete, you can move your agent to Notes.
You can now run your agent in Notes.
![]() |
![]() |