The Actions tab lets you set up actions for an agent to execute.
Creating agent actions
Log in to Mobile Web Studio, select Automate | Agents from the left pane, then click New. The Agent Builder appears.
Select the Actions tab.
Click Add and select:
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.
Creating a delivery action
The Deliver action lets you select applications that have content you want written to an adapter.
Select Add | Deliver from the Actions tab. You see the Action Details window.
Complete these fields:
Description – enter a description of this action.
Destination Viewer – specifies the format in which to write the content. Currently, only HTML is supported.
Destination Set – click Add to select an adapter into which an application’s content is written. See “Using adapters” for details on defining adapters for agent use.
The content of each application in the Application Set is written to each defined adapter that you select for the Destination Set. To select multiple adapters, hold down the Ctrl key as you select each adapter, then click Add.
After you add an adapter to the Destination Set, select the adapter and click Properties to display a description of the adapter.
Application Set – click Add to select the applications from which content is written to an adapter. There are four options:
Application – select an individual application.
Criteria – select an application based on criteria.
Rule Application – pass the triggered rule application to this action. This option is enabled only if a rule is set in the agent.
Matching Rule Record – pass the matching record from the rule as XML content to the destination set. This option is enabled only if a rule is set for the agent.
When you select Criteria, you see the Add Content by Criteria window.
Click OK to save the delivery action.
Creating 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.
Select Add | Notify on the Actions tab.
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.
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.
Include Rule’s Content – select this option to display additional options that pertain to the executed rule. This option is enabled only if a rule is selected.
Send the Entire XML Rule Source – sends the XML content of the rule that was triggered.
Send Only the Record(s) From the Rule Source That Meet the Rule Criteria – sends the section of the rule application that was triggered. For example, the e-mail content might look similar to this:
Date: Mon, 21 Jul 2003 11:35:39 -0700 (PDT) From: agentserver@sybase.com Reply-To: agentserver@sybase.com Subject: bonds portlet matched X-Mailer: Sybase-EP Rule executed on portlet=bonds(id=271)v0.1 Included Matching Records: <?xml version="1.0" encoding="UTF-8"?> <MatchingRecords><Match><Record> <Field op_label="Maturity" op_position="1">3 Month </Field> <Field op_label="Yield" op_position="2">0.79 </Field> <Field op_label="Yester- day" op_position="3">0.78 </Field> <Field op_label="Last Week" op_position="4">0.77 </Field> <Field op_label="Last Month" op_position="5">0.71 </Field> </Record></Match></MatchingRecords>
Send the 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 Application as XML That Met the Rule Criteria – sends the rule application that triggered the rule as the exact XML that matched the criteria.
Click OK to save the action.
Creating an agent action that triggers another
agent
Triggers allow one agent to process data and determine if another agent should be run.
Select Add | Trigger on the Actions tab. You see the Add Agent Search dialog box.
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 codes in the Details column of the agent list in the Agent Manager detail pane. Choose from these options to narrow the search based on what is included in the agent.
Schedule – matches agents with an “S” details code.
Rules – matches agents with an “R” details code.
Content Delivery – matches agents with a “D” details code.
Send Notification – matches agents with an “N” details code.
Trigger Agent – matches agents with a “T” details code.
Error Management – matches agents with an “E” details code.
When you save an agent, the system assigns the agent
a code based on the details contained in the agent.
Status – select the status of the agents you are searching for—Ready, Stopped, or Deleted.
Owner – enter the user name of the person who owns the applications for which you are searching.
Click Search. The agents that match the selected options display in the Results pane.
In the Results pane, select the agent you want to trigger and click Add. You return to the Rule Editor.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |