Troubleshooting
|
|
1. |
Review the agent log
|
|
2. |
Use the Debugger for LotusScript agents
|
|
3. |
|
|
4. |
Monitor the Domino Server Log (requires special access)
|
|
5. |
Monitor the Domino Server Console (requires special access)
|
|
A.21.2 |
As with most application development, you'll find there's no substitute for experience, and as you gain experience, you'll find one technique to be preferred over others. You'll also find there is no easy method to troubleshoot agents that utilize "Simple Actions" or Formula Language.
|
A.21.3 |
The Domino Designer client includes a feature to test the agent. When utilized, the client
The Agent Log is produced by testing the agent. This is accomplished by selecting the agent in the Domino Designer client and choosing the Agent > Test menu options. The software subsequently returns the expected results along with potential errors in a dialog. Figure 21.7 illustrates a sample Agent Log.
In this example, statement 2 indicates that this is a scheduled agent that has been signed by "Mark Elliott". Statement 4 shows the agent
Note
The Agent Log can only be displayed for specific types of agents. For instance, agents that are developed to parse or utilize the
For agents that utilize LotusScript, the debugger can be used to trace the code and review object values as the agent executes. As described earlier in the chapter, the debugger can step through the agent execution, halt execution, and display detailed information pertaining to all LotusScript objects. Unfortunately, this feature only applies to LotusScript. There is no comparable function that can be used to trace agents that are written in "Simple Actions" or Formula Language.
Message prompts can be used to display data values or status points in the execution of the agent from the user interface. This approach can be used for manually triggered agents. Using Formula Language commands (such as @Prompt ) or LotusScript commands (like Print , Messagebox , and Prompt ), you can periodically display information in the Lotus Notes client. The resulting information can sometimes identify problems with the agent.
Other avenues include the LotusScript
NotesLog
class, which can be incorporated into agents that utilize LotusScript. This class offers
The Domino server log contains a running history of events and informational text messages associated with the server's operation. This database resides on the server and is updated as events occur. It also tracks messages issued by the LotusScript print statement for all agents run by the server. It's important to understand that this a restricted database. Based on the default ACL settings, you probably will not have access to this database. Consult your Domino server administrator to request "Read" access to the database.
After you have appropriate access, select the
File > Database >
The Domino Server Console displays information pertaining to the operation of the server. This can include informational messages during agent execution, similar to those appended to the server's log file. Additionally, you can issue a variety of the commands to retrieve status information for a given agent. However, to run these commands, you must have access to the server's console window or the authority to establish a remote console connection using the Domino Administrator client. For many, these options will not be
Tell amgr schedule Displays the current list of scheduled agents. The console information includes the agent work queue, trigger type, target run time, agent name, and affected database name.
Tell amgr status Displays the current status of the various agent work queues and run-time control parameters. This command is helpful to determine the control parameters as well as to obtain a general snapshot of the agent status.
Load amgr -? Displays help information for the agent manager command.
Show agents DatabaseName Displays all agents for the specified Notes database (where DatabaseName represents a valid Lotus Notes database).
Tell amgr cancel DatabaseName AgentName Terminates a scheduled agent that is currently running (where DatabaseName represents a valid Lotus Notes database and AgentName represents a valid agent). The command only applies to scheduled agents. Be sure to specify a valid database name and agent name when issuing this command.
Tell amgr run DatabaseName AgentName This command starts a specified agent for a given database (where DatabaseName represents a valid Lotus Notes database and AgentName represents a valid agent). Be sure to specify a valid database name and agent name when issuing this command.

Mastering XPages: A Step-by-Step Guide to XPages Application Development and the XSP Language

XPages Extension Library: A Step-by-Step Guide to the Next Generation of XPages Components

Survival Guide for Lotus Notes and Domino Administrators

IBM Lotus Domino: Classic Web Application Development Techniques