When the data matches the rule you established, in this case the stock price crossing a certain threshold, the alert is sent to your telephone or mobile device. For example, you may receive a message similar to this:
Last Trade: 17.11
Creating rules and schedules
from Mobile Web Studio
Use this procedure to create a sample rule and schedule for an alert using the Agent Manager.
In Web Studio, select Agents from the Manager menu in the left pane, then click New to launch Agent Builder.
Select the Schedule tab and establish a schedule for the rule:
Click the box next to “Trigger Agent based on a Schedule” to select it.
For Time, use the option controls to specify the start time. For this example, use the current time
For Recurrence, use the option controls to select the recurrence unit (such as seconds, minutes, hours) and interval. For the tutorial, select Minutes as the unit, and 5 as the interval. The alert schedule recurs every five minutes.
For Range, enter today’s date in MM/DD/YY format as the start date. For convenience, use the calendar icon to select the month and date.
For the end date, click “No end date.” Alternatively, you can click “End by” and specify an end date.
Select the Rule tab and establish a rule for the newly created application:
Click the box next to “Execute Agent based on a “Rule” to select it.
Click the Add icon to find the newly created Application.
Click the Find icon once the Rule window launched.
Click Search to find the SMS Test Application that you created in “Creating an alert for SMS delivery”.
Select the application from the list to add this newly created Application, and click Add.
In “Execute agent when,” select “field2” and “is greater than” from the drop-down lists, and enter a value in the text field that is slightly higher than the current stock quote.
Click the plus sign ( + ) to apply this rule.
Click OK to finish.
Select the Action tab and set up a destination:
Click Add to add the destination, and select Notify | SMS. The Action Details window displays.
In SMS To, enter your telephone number.
Select your carrier from the drop-down list.
In Subject, enter a subject for this message.
Select “Include Rule’s Content.” Additional options display.
Click “Send the Portlet that met the Rule Criteria.”
Click OK to finish and close the Action Details window.
In Agent Builder, click Save to save the agent. Supply
a name for the agent, such as GoingUp
,
assign roles to all, and click OK.
In Agent Manager | Stopped, select the newly created agent and click Start to run the agent.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |