Creating Agent Actions

The Action dialog lets you set up actions for an agent to execute.

Accessing the Actions dialog

When you create a new mobile agent, the Action page displays in the New Mobile Agent Wizard.

You can also access the Actions page anytime when you edit a mobile agent:

  1. Right-click the mobile agent for which you want to set up actions, and select Edit.

  2. In the Edit Mobile Agent wizard, select Actions from the left pane. The configuration wizard displays.

  3. Click the down arrow next to Add and select the type of action you want to add to the mobile agent:

    • Deliver – to write an application’s content to an adapter that writes the content to a file system, an e-mail message, or a database table.

    • Notify – to send an e-mail message that contains the rules content or the actual rules to the users.

    • Trigger – to select another agent to execute when this agent runs.

To set up a deliver action:

  1. In the Add Deliver Action wizard, in the General section, complete these fields:

    • Destination Viewer – specifies the format in which to write the content.

    • User List Adapter:

      • Default User

      • Push-registered Users

    • Description – enter a description for the action.

    • Destination Set – click Add to display the Adapter Search dialog and select an adapter into which an application's content is written. See “Using adapters” for details on defining adapters for agent use.

    • Mobile Application Set – click the down arrow next to Add to select the applications from which content is written to an adapter. The options you see depend on whether or not an agent rule is defined. If not, you see these two options:

      • Mobile Application – select an individual application.

      • Criteria – Select an application based on criteria that you specify.

    If agent rules are defined, you see three additional options:

    • Rule Mobile Application

    • Matching Rule Record

    • Rule Data

  2. Click OK when you are finished adding actions to the mobile agent.

  3. Click Finish to save the mobile agent.

To set up a notify action:

This option lets you enter an e-mail address to send application content and an optional message without creating an e-mail adapter.

  1. In the Add Notify Action wizard, complete these options:

    • E-mail – complete these options:

      • E-mail To – enter the complete e-mail address of the recipient.

      • Subject – enter the text that should appear as the subject for the e-mail’s message.

      • Prepend Subject with Rule’s Application Name – adds the name of the applications that were executed and passed through the Rules section to the beginning of the Subject line.

        Note

        This option is for each application executed by a rule; that is, if a rule is a criteria, when an application triggered, a message gets sent for each application. If, for example, you are searching for broken applications, you can use this option to be notified of the application that is no longer working.

      • Include Message – lets you write a message that displays in the message body. When you select this option, a text window displays where you type in the message

    • SMS – complete these options:

      • SMS Carrier – enter the name of the SMS carrier.

      • New Carrier – otpional when the SMS carrier is "Add New."

    • Include Rule's Content:

      • Send the Entire XML Rule Source – sends the XML content of the rule that was triggered.

      • Send the Rule Data From the Rule Source

      • Send Only the Record(s) From the Rule Source That Meet the Rule Criteria – sends the section of the rule application that was triggered.

      • Send the Mobile Application That Met the Rule Criteria – sends the rule application that triggered the rule. The application is sent in the default playback format, which was assigned during application creation and set the content-type; specifically, it could be an XML application.

      • Send the Mobile Application as XML That Met the Rule Criteria – sends the rule application that triggered the rule as the exact XML that matched the criteria.

  2. Click OK when you are finished adding actions.

  3. Click Finish to save the mobile agent.

To create an agent action that triggers another agent:

Triggers allow one agent to process data and determine if another agent should be run.

  1. In the Agent Search wizard, complete these options:

    • Name – enter the name of the agent you want to find. If you leave this field blank, the portal searches for all agents.

    • Details – these optional selections match the settings in the Details column of the agent's advanced properties page. Choose from these options to narrow the search based on what is included in the agent.

    • Schedule – matches agents with the Schedule property set to true.

    • Rules – matches agents with the Rules property set to true.

    • Content Delivery – matches agents with the Deliver Notification property set to true.

    • Send Notification – matches agents with the Notification property set to true.

    • Trigger Agent – matches agents with the Agent Trigger property set to true.

    • Error Management – matches agents with the Error Management property set to true.

    • Status – select the status of the agents you are searching for—Ready, Stopped, or Deleted

    • Owner

  2. Click Search. The agents that match the selected options display in the Results pane.

  3. In the Results pane, select the agent you want to trigger and click Add. You return to the Rule Editor.

  4. Click OK.

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com