The Rules page lets you specify rules that the application’s content must meet before the action associated with the agent can be executed. For example, you may want an agent to notify certain people of a stock price only when that price reaches a specified amount.
Accessing the Rules page
When you create a new mobile agent, the Rules page displays in the New Mobile Agent Wizard.
You can also access the Rules page anytime when you edit a mobile agent:
Right-click the mobile agent for which you want to set up rules, and select Edit.
In the Edit Mobile Agent wizard, select Rules from the left pane. The Configure the Mobile Agent for Rules dialog displays.
To set up agent rules:
In the Configure the Mobile Agent for Rules dialog, click Add.
The Add Rule editor contains these sections;
General
Mobile Application – select to base the agent rules on an existing mobile application.
Criteria – basing a rule on criteria allows you to execute a rule on a selection of applications that meet user-specified parameters; for example, to execute the rule on applications owned only by a particular user.
Disable After Triggered Once – selecte to disable the agent after it is triggered once.
Rule Data – enter the text you want to receive as a message in the alert.
Description – enter a description for the rule.
Rules
Rule Relationship – group rules together based on Boolean operators, by selecting “AND” or “OR”from the drop-down list. See Using Rule Operators for a description of each operator.
Select Fields By – select how to construct the rules based on:
Label – uses column labels in the data. When table fields reorder, the rule still picks up the correct field.
Position – an index on positions in the data.
XPath – if you choose to view the content as XML, this option allows all matches to be done via XPath expressions.
Execute Agent When – shows a list of relational operators. To add relational operators, click Add. A new Add Rule dialog window displays where you can:
Select the Preview Source:
Playback – displays the application as it previews.
XML – displays the application as XML code.
Execute Agent When – select when the agent executes from the relational operator options in the drop-down list. Enter a value in the last field. See Using Rule Operators.
Click OK to return to the previous Add Rule wizard.
After adding the rules for the agent, click OK.
The Rules page dialog displays. Click Add to add additional rules for the agent, or to edit the rules. Click Finish to save the agent.
Basing rules on a mobile application's content
In the Add Rule wizard, select Mobile Application, and click Search.
In the Mobile Application Search dialog, select the mobile application you want to base the agent rules on, and click OK. The Mobile Application Search dialog closes. See Using Mobile Application Search.
In the Add Rule wizard, use the Rules section to set up rules. See Using Rule Operators.
Click OK when you are finished adding rules.
Basing rules on criteria
In the Add Rule wizard, select Criteria, and click Select.
To complete the Criteria Parameters, select:
Category – find applications that are only in the selected category.
Subcategory – find applications that are only in the selected subcategory.
Status – find applications that only have the selected status.
Catalog – find applications that are only in the catalog you select.
Page – find applications that are only on the page you select.
Owner – find applications that only belong to the user whose name you enter.
Modified By – find applications that belong only to the user whose name you enter.
Roles – find applications that are assigned only those roles you select. See Roles.
Click OK to save the criteria and return to the previous Add Rule wizard.
Click OK when you are finished adding rules.
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com