Triggering an agent on an event

Configure the agent to run on an event when you want the agent to run only when a specific event occurs, such as after new mail arrives.

Before you begin

You must create an agent before you can specify what triggers it to run. See Creating agents for more information.

About this task

You can trigger an agent on an event or on a schedule. To trigger an agent on an event, complete the following steps:

Procedure

  1. On the Basics tab of the Agent Properties box, click On event.
  2. Choose an event from the list.
    Action menu selection
    Use this event for user-activated agents or for WebQuerySave or WebQueryOpen agents.
    Agent list selection
    Use this event for agents that are called by other agents and for agents that are still being developed.
    Before new mail arrives
    Use this event for processing mail before it is listed in the mail databases; for example, to move incoming mail to a folder. With this option, the agent runs before the message is listed in the application. Therefore, be careful what other options you choose. For example, do not use the Mark Documents Read simple action because documents will always be marked unread when they are listed in the application.
    After new mail has arrived
    Use this event for processing incoming mail: to respond to it, forward it, or file it. Interactive functions and functions that impede the progress of the mail router are ignored when documents are mailed into the application. For example: @DbColumn, @DbCommand, @DbLookup, @MailSend, @Prompt, @Command, or @PostedCommand.
    After documents are created or modified
    Use this event for workflow tasks where a task is performed based on new or changed documents.
    When documents are pasted
    Use this event for documents that must be modified as they are routinely pasted into an application. Paste-activated agents cannot use @Command or @PostedCommand.
  3. Choose one of the following targets from the pull-down list. Targets are the documents on which the agent will run.
    • All documents in application
    • All new and modified documents
    • All unread documents in view
    • All documents in view
    • All selected documents
    • None