Skip to main content

Setting up the agent database

The agent for Domino server script (agtgdmno) requires that a special agent database be created on the Domino server. The purpose of the database is to communicate with LotusScript agents that will be used to perform operations on the target Domino database. The agent database will relay commands, information, and return values between agtgdmno and the LotusScript agents.

To set up the agent database you must:

  1. Create the agent database

  2. Create a form for the agent database

  3. Create a view for the agent database

  4. Add LotusScript agents to the agent database

Creating the agent database

  1. Create the agent database

  2. Launch Domino Designer.

  3. Select File > Database > New. The New Database window appears.

  4. In the Specify New Database Nameand Location area:

    1. Select the Domino server that is hosting the Domino database you want to manage from the Server drop-down menu.

    2. Name the agent database. Type an arbitrary name in the Title field. This also causes the File name field to be populated with a <name>.nsf value.

  5. In the Specify Template for New Database area :

    1. Select the Domino server from the Server drop-down menu.

    2. Select -Blank- for the template.

  6. Click OK.

Creating a form for the agent database

Add the following form to the agent database.

  1. On the tab for the new agent database, click the New Form button. A tab for the form opens.

  2. Click to place the cursor in the top left of the workspace of the Form tab.

  3. Use the following procedure to add each of the required fields to the form.

    1. Type the name of the field then a space.

    2. Right-click and select Create Field to bring up the Field dialog.

    3. Type the name of the field in the Name field.

    4. Close the dialog to save your changes.

    5. Move the cursor past the newly created field then press Enter to advance to the next line.

    Create the following fields. Note the extra configuration required for some fields.

    • UserId

    • FullName

    • AccountId

    • ShortId

    • NewPassword

    • OldPassword

    • ModelId

    • GroupId

    • GroupName

    • CreationAttributes – also check Allow multiple values in the Field dialog.

    • UserAttributes – also check Allow multiple values in the Field dialog.

    • ReturnCode

    • ErrorMsg

    • ReturnValue

    • ReturnAccountId

    • ReturnShortId

    • ReturnAttributes – also check Allow multiple values in the Field dialog.

    • ReturnGroups – also check Allow multiple values in the Field dialog.

  4. Click File > Save and name the form.

Creating a view for the agent database

Add the following view to the agent database.

  1. Select Views from the agent database’s bookmarks.

  2. Click the (untitled view) bookmark icon to bring up the View dialog. Name the view. Close the dialog to save the changes.

  3. Create the UserId column.

    1. In the tab for the view, right-click the # column, and select Column Properties to bring up the Column dialog.

    2. Change the title from # to UserId. Close the dialog to save the changes.

    3. In the UserId (Column): Column Value pane, select the Field radio button then select UserId from the list of fields.

  4. Use the following procedure to create the remaining columns.

    1. Double-click to the right of previously-defined column header to create a new column and bring up the Column dialog.

    2. Type the name in the Title field. Close the dialog to save the changes.

    3. In the <name> (Column): Column Value pane, select the Field radio button then select the corresponding <name> from the list of fields.

    Create the following columns. Ensure that you associate each column with the field of the same name.

    • FullName

    • AccountID

    • ShortID

    • NewPassword

    • OldPassword

    • ModelID

    • GroupId

    • GroupName

    • CreationAttributes

    • UserAttributes

    • ReturnCode

    • ErrorMsg

    • ReturnValue

    • ReturnAccountId

    • ReturnShortId

    • ReturnAttributes

    • ReturnGroups

  5. Select File > Save.

Adding LotusScript agents to the agent database

A LotusScript agent must be created for each operation that is going to be performed on the target system database. See Creating LotusScript agents for details how to script an agent. Once the agents are scripted they need to be added to the database. The following procedure details how to add a LotusScript agent to the agent database. Perform the procedure for each agent that needs to be added to the database.

  1. Launch Domino Designer.

  2. Open the Shared Code bookmark folder for the agent database and click Agents.

  3. Click New Agent in the workspace to bring up the Agent dialog box.

  4. Name the LotusScript agent. It is recommended that you use the name of the operation that the script will perform; however, this is not mandatory, as the LotusScript agent will be mapped to an actual agent operation in the agtgdmno configuration file (see Configuring LotusScript agent operations ).

    In the Target drop-down menu select "All documents in database". Close the dialog.

  5. Select LotusScript from the second drop-down menu in the <operation name> (Agent): Actions pane.

  6. Select Initialize in the Objects tab.

  7. Enter the script for the operation into the <operation name> (Agent): Actions pane between the "Sub Initialize" and "End Sub" commands.

      Sub Initialize
        <enter script text>
      End Sub
  8. Select File > Save.