Page tree
Skip to end of metadata
Go to start of metadata

Use Teamstudio Build Manager to run agents automatically.

To run agents:

  1. Select the database document, for which you want to automatically refresh the design.

    Note: You must have already created a promotion path document.

  2. Click the Create action button and select Run Agent. The Run Agent document appears:
  3. The Run Agent document is active by default. Leave this setting.
  4. Enter a descriptive name in the Description field (for example, Run Agent).
  5. Click Browse to select the database where the agent lives that you want to run.
  6. Click Get Agents to populate the Agent Name dropdown.
  7. Select an agent.
  8. If you want to fail the promotion if the selected agent fails to run, check the Promotion Fails if agent cannot be initialized checkbox.

    Note: The following steps require you to perform additional setup detailed in a separate procedure and require the inclusion of additional LotusScript libraries and code modifications. See “Using the Advanced Features of Run Agent,” below.

  9. If you want to pass parameters to an agent or check its status after it runs, check the Enable additional options using agent parameter database checkbox in the Advanced Options section.
  10. The following advanced options appear:
    1. Get agent status from parameter database after agent runs
    2. Include messages from agent in the promotion log
    3. Pass parameters to agent
  11. If you want, check the Get agent status from parameter database after agent runs.
  12. The Fail promotion if agent does not confirm success—check if you want the database promotion to fail if the agent does not run to completion.
  13. If you want, check the Include messages from agent in the promotion log checkbox
  14. If you have parameters you want to pass to an agent, check the Pass parameters to agent checkbox.

Save and close the document.

The new Run Agent entry appears in the right pane, under the database to which it applies. Note: Build Manager calls the agent you specify with Run Agent using the NotesAgent.RunOnServer() method in LotusScript. Security and context for the agent


Using the Advanced Features of Run Agent


Use the following two-part procedure to set up Build Manager to use the advanced features of Run Agent, including passing parameters to the agent, logging messages from agent, and confirming successful completion of an agent. 

Part One: set up database and signers on the target server.

  1. Make sure AgentParameters.nsf is saved in the Teamstudio directory of the target server (the server where the database containing the agent is located).

  2. Make sure the ID promoting the database in Build Manager has Editors rights for AgentParameters.nsf.

  3. Make sure the signer of the target agent has Editor rights for AgentParameters.nsf. 

Part Two:

  1. Include the TSAgentParameters library and code to call it.

  2. Copy the TSAgentParameters script library from AgentParameters.nsf.

  3. Use your custom code to call the methods exposed by the global object


Include the library, in the options section:

Check that the TSAgentParameter object was created. Build Manager always passes NoteID. If you call the agent without this parameter, no object is created:

Check if it registered error, for example, if it couldn’t find the document or the parameter db:

Get a single parameter by name:

Get all parameter names as an array:

Log a message to the parameter db:

Mark status complete. This is what lets Build Manager know if the agent completed successfully:


Get all parameters in a LotusScript list variable:

A complete example:




  • No labels