Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






runOnServer method

Runs the agent on the computer containing the database.

Defined in

Agent

Syntax

public int runOnServer( )

throws NotesException
public int runOnServer(String noteID)

throws NotesException

Parameters

string NoteID

Optional. The NoteID of a document. This value is passed to the ParameterDocID property of the called agent.

Note This parameter is new with Release 5.02.

Return value

int

Status of the operation, where 0 indicates success.

Usage

This method runs any agent regardless of source language (simple action, formula, LotusScript, Java).

You cannot run an agent recursively (cannot call it from itself).

The rules governing the access level required to run an agent using the runOnServer method are the same as for any other server-based agent. For information regarding agent security, see "Setting up agent security."

The user cannot interact directly with a called agent. User output goes to the Domino log.

You cannot debug a called agent.

On a local database, the runOnServer method works like the run method; that is, it runs the agent on the local computer or the server handling the remote (IIOP) calls.

Note This behavior is new with Release 5.0.2. The former behavior was to issue the error message "runOnServer must be used with a remote database."

If a Notes client invokes runOnServer, security is through the signer of the agent.

Language cross-reference

RunOnServer method in LotusScript NotesAgent class

AgentSetServerName @command in formula language

See examples

Examples: runOnServer method
Related topics
Accessing agents




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009