Import or Write your Agent

Create a project in the Workbench into which you will import your agent.

To create a project:

  1. Go to the Projects page of the Workbench.
  2. On an empty space in the All Projects view, click mouse button 2.
  3. Select Add - Project.  The Add Project SmartGuide will open.
  4. Select the Create a new project named radio button.
  5. Enter a name such as Domino Agents in the text field.
  6. Click Finish.

When the SmartGuide closes you will have a new project in the workbench called Domino Agents.

You are now ready to import an agent from Notes, or create a new agent in the IDE.

To import an agent from Notes into your Domino Agents project:

  1. Select the Domino Agents project with mouse button 2.
  2. Select Import. A SmartGuide will open.
  3. Select Directory as your import source.
  4. Click Next.
  5. Fill in the Directory field with the path that contains your agent's java file.
  6. Select the .java checkbox.
  7. Click the Details button beside .java and select the java file that you want to import.  Click OK.
  8. Click Finish

The imported Java code is compiled and any unresolved problems that are introduced are added to the All Problems page.

Your .java file will appear as in a package under your Domino Agents project in the Workbench.

To create a new agent in VisualAge for Java:

  1. Click on your Domino Agents project with mouse button 2. 
  2. Select Add, then Class.  The Create Class SmartGuide will open. 
  3. Enter a package name in the Package text field.
  4. Select the Create a new class radio button. The Create Class SmartGuide opens.
  5. Enter a class name for you agent, and select DebugAgentBase as your Superclass.
  6. Click Finish.

Your new package and class will appear under your Domino Agents project in the Workbench.  Click on your class with mouse button 1.  In the Source window of the workbench, write the code for your agent (see the Java Programmer's Guide in Notes for instructions).

When you have finished writing your agent, you should generate an AgentContext document so you can run your agent in the IDE.

ngrelc.gif (533 bytes)
The Domino AgentRunner
Projects and Other Program Elements

ngrelt.gif (466 bytes)
Creating a Class
Writing and Formatting Source Code
Saving Changes to Code
Setting up for the AgentRunner
Generating an AgentContext Document
Running and Debugging your Agent
Creating the Production Agent