7.8 Automated Alerts

You can implement an automated alert by creating a scheduled task that executes when specified conditions are met by report or Viewsheet data. This allows you to automatically inform a user when results within the data demand their attention (e.g., inventory falls below a certain level, order volume spikes, etc.).

To create an automated alert, follow the steps below:

1. Design the scheduled task as described in Creating a Scheduler Task. Take note of the following:

a. In the 'Report' or 'Viewsheet' menu of the Action tab, choose the report or Viewsheet which contains the data you wish to evaluate.

b. Configure the task actions (notification, email, etc.) to accomplish the desired “alert” behavior. For example, if you wish to generate an email to users when a Viewsheet data indicator meets certain criteria, configure the 'Deliver to Emails' message to convey the desired alert.

c. Configure the settings on the Condition tab to execute the task at the interval at which you wish to evaluate the report or Viewsheet data.

2. Within the specified report or Viewsheet, implement the logic which determines whether an alert should be dispatched. In gen­eral, you should place the script containing this logic on the indi­vidual component containing the data to be evaluated.

3. Within the report or Viewsheet script, place a call to scheduleAc­tion() to specify whether the scheduled task should execute or not (based on the logic you implemented above).

a. For a report, scheduleAction(Boolean) is a property of individual report elements. If a report element sets scheduleAction(false), the scheduled task will not execute.

b. For a Viewsheet, thisViewsheet.scheduleAction(Boolean) is a property of the Viewsheet itself. If a Viewsheet script sets thisViewsheet.scheduleAction(false), the scheduled task will not execute.

4. Deploy the report or Viewsheet to the repository as you usually would.

When the scheduled task executes (as determined by the Scheduler settings on the Condition tab), the Scheduler will check to see whether scheduleAction() is set to true or false for the report or Viewsheet. If the value is false, the Scheduler aborts the task actions, and no alerts are issued. If the value is true, the Scheduler proceeds to execute the task actions, and any specified alerts are delivered to users.

See Also

scheduleAction(Boolean), for more information about using the report property.

thisViewsheet.scheduleAction(Boolean), for more information about using the Viewsheet property.

<< 7.7 Programmatic Scheduler Access © 1996-2013 InetSoft Technology Corporation (v11.4) 8 Presentation >>