Monday, October 1, 2001

Control your application’s agents with this Agent Launchers tool


By Jonathan Coombs

After delivering an application, have you ever wished you or the application's administrators had more control over the application's agents? Have you ever needed to quickly disable a scheduled agent that was generating errors in production?

Notes provides a rich set of options for configuring and controlling manual and scheduled agents through the Designer client, but for good reasons these options are only available as design changes to developers with Designer access. I always avoid making design changes directly to production databases, and many Notes infrastructures prohibit such changes anyway. Still, I often want to make small agent adjustments directly in production without having to go through a full design refresh of the production database.

The Agent Launchers tool presented in this article provides several features that I've found useful in maintaining tight control over the agents in production applications. They are most useful in infrastructures that prevent developers from having Designer access to any production databases, but they can provide enhanced agent control for an application in any Notes and Domino environment.

The manual menu launcher provides dynamic control over the lists of menu agents that different users (e.g., developers, application administrators, default users) can see and execute. It allows scheduled agents to double as menu agents, and it allows agents to be "renamed" or removed without making design changes. This can increase the flexibility and robustness of an application while simplifying the designs of its agent.

The application is pictured in Figure A.


You can select agents as shown here. (click for larger image)

The agent scheduler mimics the Notes Designer interface for scheduling agents, but it allows you to do so without making a design change. This is useful if you or the application's administrator needs to enable, disable, or modify an agent's schedule to deal with changing needs or an agent that is out of control. It's also helpful to be able to view all of the available agents and agent schedules through an application's user interface, as shown in Figure B.


You can view all of the available agents and agent schedules. (click for larger image)

Design standards

All design elements and script variables in the sample database follow common naming conventions. This helps make code references much easier to read, and it makes it easier to search for a specific element. For example, even with a good analysis tool, it can be hard to find all references to a lookup view named "Order" if you also have an "Order" form, an "Order" page, an "Order" script variable, and an "Order" field. It's much clearer to name these "vwLookOrder", "frmOrder", "pagOrder", "varOrder", and "fOrder", respectively.