Function EN Version 4.50

@ExecuteAgent

Agent Note NotesSystem

Syntax

@ExecuteAgent(AGENTHANDLE1);
@ExecuteAgent(AGENTHANDLE1;RETAGENTSTDOUT2);
@ExecuteAgent(AGENTHANDLE1;RETAGENTSTDOUT2;NOTEHANDLE3);

Description

This @Function executes the agent with the AGENTHANDLE AGENTHANDLE1 either against all documents (without the parameter NOTEHANDLE NOTEHANDLE3) of the DB in which the agent is located, or against a single document, with the NOTEHANDLE NOTEHANDLE3, in this DB.

RETAGENTSTDOUT2 returns the redirected stdout (print statements in the agent).

Return value:
If the @Function was executed successfully, TRUE is returned; otherwise @ERROR.

Example: @ExecuteAgent(AGENTHANDLE1);

DBHANDLE1:=@OpenDB("TEST.NSF");
AGENTHANDLE1:=@OpenAgent(DBHANDLE1;"Agent Name");
Ret:=@ExecuteAgent(AGENTHANDLE1);
@LogReport(Ret);
AGENTHANDLE1:=@CloseAgent(AGENTHANDLE1);
DBHANDLE1:=@CloseDB(DBHANDLE1);

"Agent Name"A database is opened, the agent named "Agent name" is opened and executed against all documents of this DB, then closed again, and finally the database is closed again.

Note : This text was machine-translated and may contain inaccuracies.