Creating, Modifying, Troubleshooting Web Agents

Automation can easily be added to an application through the use of agents. Agents are programs coded to do specific tasks. Agents can perform actions as simple as changing a value in multiple documents; agents also can perform complex operations, such as controlling workflow within a global application. Agents have to run on a Domino server; they do not run in a browser. Browsers can activate them, but not run them.

Running Agents on the Web

Agents are activated on the Web through @Commands or a URL command. The two @Commands you can use are

  • @Command ([ToolsRunMacro]) is launched last in a formula.

  • @Command ([RunAgent]) is new to Domino 6 and launches wherever it appears in a formula.

The OpenAgent URL command launches the agent and can be placed wherever URLs can be placed. URL commands are discussed in detail in Chapter 16.

WebQueryOpen and WebQuerySave are two form events that can use the @Command formula to trigger an agent from the Web. They are discussed in “Deploying and Utilizing LotusScript for Web Clients,” later in this chapter.

Running Agents as Web Users

Normally agents run under the access rights of whoever signed the agent. New with Domino 6 are security settings that allow designers to override the signers' access rights. On the Security tab of the agent properties is one of the new security settings: Run as Web User. If you check this option, the agent runs with the rights of the user overriding the signers.

Setting Agent Properties

Scheduling agents is not supported on the Web. Web agents have to be triggered to run manually, which is done from the Action menu in a Notes client. The Web does not have an Action menu. To trigger Web agents to run manually you must—in the Agent properties—select On Event for the Trigger; then, from the On Event drop-down, select Agent List Selection.

Pasted documents and selected documents are foreign concepts to the Web. For the target, choose None if the agent is launched from WebQueryOpen or WebQueryClose. When the agent is launched from an OpenAgent URL, choose All documents in database.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.205.2