Components of an Alert

In this section:

Reference:

The ReportCaster Alert feature requires the following components:

A ReportCaster Alert consists of the following:

An alert test procedure is required to check whether or not a set of defined test conditions (rules) is met (true or false). An alert test is either a "WebFOCUS Test" that is a simple TABLE request you create to define the condition to test for or, a "Test for File Existence" of a file that is accessible to the WebFOCUS Reporting Server to which the alert test is submitted.

If you select WebFOCUS Test, you are prompted to create the Alert test using either the Report Assistant or the Editor. The version of Report Assistant that is invoked does not have field styling, heading, footing or report options (such as OLAP and On-demand Paging) because the Alert Test determines whether a specified condition is true. It is not the report that is distributed.

The most important component of the Alert test is the condition (WHERE statement) you create. The condition determines if the alert is triggered (true). If you use the editor, be sure to keep the TABLE request simple. The TABLE request should only contain the fields to evaluate the condition (WHERE statement), and an ON TABLE HOLD statement. When you save the request, it is validated to ensure you have included the ON TABLE HOLD statement.

If the conditions are true, an alert event procedure is executed. An alert event procedure specifies the report to be distributed. You have the option of using Report Assistant to create the report (this time with all the functionality available for styling and report options) or you can select an existing Managed Reporting report that resides in the same domain.

Once an alert is created, it is stored in the Managed Reporting Repository.

Considerations: One thing to keep in mind is the flexibility of editing the request for the report to be distributed. If you choose to create the alert event procedure using Report Assistant from within the Alert Wizard, you have to go back through the Alert Wizard and select the New WebFOCUS Report option again to edit the request. This is because the Alert test and the report to distribute are contained within a single Standard Report. Therefore, it is recommended that you select an existing Standard Report as it is easier to access Report Assistant to make changes and it is also available to run interactively or schedule independently of the Alert.


Top of page

x
Reference: Alert Test Sample Code (Created With the Editor)

In the sample code that follows, an Alert test is created with the Editor and a report to be distributed is created with Report Assistant. To keep the sample code simple, styling and report options, such as report headings and conditional styling, are not included in this request. The Alert tests for products that have an inventory quantity greater than 20000.

Notice after the first TABLE request there is an –IF statement that checks if the number of lines in the report is greater than zero (–IF &LINES GT 0). This checks to see if the Alert should be triggered (true). If the number of lines is greater than 0, then there are records that satisfy the condition and the report is distributed. If the number of lines is 0, then there are no records that satisfy the condition and the second TABLE request (the distributed report), does not run.

The following is the Alert test sample code:

-* Created by Alert Wizard
-* version 1.0
-* start of the test report
TABLE FILE CENTINV
SUM CENTINV.INVINFO.QTY_IN_STOCK
BY CENTINV.INVINFO.PRODCAT
BY CENTINV.INVINFO.PRODTYPE
BY CENTINV.INVINFO.PRODNAME
BY CENTINV.INVINFO.PROD_NUM
WHERE (CENTINV.INVINFO.QTY_IN_STOCK GT 20000);
ON TABLE HOLD
END
-* end of the test report
-* start of the test
-RUN
-IF &LINES EQ 0 GOTO ALERTEXIT;
-* end of the test
-* start of the output report created by Report Assistant
-* FF Line do not change this line! Field Name
-* FF Line do not change this line! Alias
-* FF Line do not change this line! Format
-* FF Line do not change this line! Segment
-* FF Line do not change this line! displayTree=0
TABLE FILE CENTINV
SUM CENTINV.INVINFO.QTY_IN_STOCK
BY CENTINV.INVINFO.PRODCAT
BY CENTINV.INVINFO.PRODTYPE
BY CENTINV.INVINFO.PRODNAME
BY CENTINV.INVINFO.PROD_NUM
WHERE (CENTINV.INVINFO.QTY_IN_STOCK GT 20000);
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
END
-* End Report Assistant output
-* start of the options
-* TWO_WAY_EMAIL=
-* TWO_WAY_EMAILDOMAIN=
-* TWO_WAY_EMAILDESCRIPTION=
-* TWO_WAY_EMAILFOLDER=
-* end of the options
-ALERTEXIT
-* End Alert Wizard


Top of page

x
Reference: Alert Test Sample Code (Created With Report Assistant)

The following sample code shows an Alert test created with Report Assistant that uses an existing Standard Report to distribute. Note the –INCLUDE of the existing Standard Report. This Standard Report can be edited without going through the Alert Wizard.

-* Created by Alert Wizard
-* version 1.0
-* start of the test report
-* Created by Report Assistant
-* FF Line do not change this line! Field Name
-* FF Line do not change this line! Alias
-* FF Line do not change this line! Format
-* FF Line do not change this line! Segment
-* FF Line do not change this line! displayTree=0
TABLE FILE CENTINV
SUM CENTINV.INVINFO.QTY_IN_STOCK
BY CENTINV.INVINFO.PRODCAT
BY CENTINV.INVINFO.PRODTYPE
BY CENTINV.INVINFO.PRODNAME
BY CENTINV.INVINFO.PROD_NUM
WHERE (CENTINV.INVINFO.QTY_IN_STOCK GT 20000);
ON TABLE HOLD
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
END
-* End Report Assistant
-* end of the test report
-* start of the test
-RUN
-IF &LINES EQ 0 GOTO ALERTEXIT;
-* end of the test
-* start of the output report
-* Description at creation time
-**Inventory Quantity Exception Report
-INCLUDE app/inventor.fex
-* end of the output report
-* start of the options
-* TWO_WAY_EMAIL=
-* TWO_WAY_EMAILDOMAIN=
-* TWO_WAY_EMAILDESCRIPTION=
-* TWO_WAY_EMAILFOLDER=
-* end of the options
-ALERTEXIT
-* End Alert Wizard

Top of page

x
The Life of a ReportCaster Alert

The following image diagrams how ReportCaster Alert processing works.

The Life of a ReportCaster Alert

  1. The Managed Reporting Administrator or Developer (using the Alert Wizard) creates an alert test and designs the report to be run if the alert condition is true.
  2. An alert schedule is created using ReportCaster.
  3. The ReportCaster Distribution Server checks for scheduled jobs in the ReportCaster Repository.
  4. When a scheduled alert test is found, it is evaluated on the WebFOCUS Reporting Server to see if all test conditions (rules) are true.
  5. If the alert test is false, the alert is re-queued for the next scheduled alert test.
  6. If the alert test is true, the WebFOCUS Reporting Server runs the alert event procedure and returns the results to the ReportCaster Distribution Server.
  7. The ReportCaster Distribution Server distributes the alert to the specified recipients.

    You can specify a description, run interval, and start time on the ReportCaster Scheduling tab.

    You can schedule the following alert schedule options:

    • The Automatically Reset option continues to run the schedule at the specified time and checks to confirm that the alert test is no longer true before the alert test is evaluated again. It is best to use this option when you do not want to receive the alert report again until after the exception condition has been addressed and occurs again. For example, when the quantity in inventory is greater than 20,000, the alert is triggered. You do not want to receive the report again until after the inventory is less than or equal to 20,000 for all products and then goes back over 20,000 again.
    • The Continue after Alert option continues to run the schedule at the specified time and distribute the report for each time the Alert condition is true. It is best to use this option when you want to be notified on the interval specified in the schedule that the Alert condition is true.
    • The Deactivate Schedule After Alert option deactivates the schedule after the Alert is triggered. The schedule has to be activated again for the Alert test to run after the Alert is triggered. It is best to use this option for one-time Alert tests. This is the default value.
    • The Delay option is best used when you want to allow a specific period of time to address the condition but want to be notified again if the condition has not been addressed. You can specify to restart the alert after a maximum of 99 hours, days, weeks, months, or years.

    Note that a Two-Way Email template can be attached to provide alert response capability.

As you complete the creation of the schedule, remember to consider the burst option to distribute specific report values, instead of the entire report. When a report is burst, the distribution information must be provided in a distribution list, distribution file, or dynamic list for Email distribution and an access list for Library distribution. The Email and Library distribution options are the most effective for Alert reports because of the push vs. pull notification through e-mail. For more information on using the burst option in ReportCaster, see your ReportCaster documentation.


WebFOCUS