Defining SQL statements for alerts - HxGN EAM - 12.0.1 - Feature Briefs - Hexagon

HxGN EAM Alert Management

Language
English
Product
HxGN EAM
Search by Category
Feature Briefs
HxGN EAM Version
12.0.1

The Before SQL and After SQL tabs can both contain a SQL statement that will be executed at the time the alert job is running the alert. The Before SQL process runs before the alert management job runs the grid and creates alerts for each record in that grid. Then, after the alerts are raised, the After SQL runs.

The Before SQL and After SQL logic are not aware of the situation in the grid, and therefore do not know which alerts will be raised (Before SQL) or have been raised (After SQL).

Both the Before SQL and After SQL tabs have the following important attributes:

  • SQL Statement – You can configure the SQL statements like you do on the Flex Business Rules screen, but since alerts are not ‘event’ driven and therefore there is no insert or update event triggering the action, these do not need to be tied to a specific record. In other words, no need for the :rowid parameter in the WHERE clause.

  • Active – If selected, the Before or After SQL Statement will be processed when the Alert Management Job is running the alert. If unselected obviously it will not. Note that ones you specify a value in SQL Statement, you cannot empty this field anymore. This check box is then the only method to deactivate the logic.

  • Execute when Previewing Grid – Select this check box if you want to run the logic when you click on the Preview Grid button on the record view. Note that it must also be active for this to work. Only select this check box if the logic is required to make the grid show correct results. For any other situation this should be unselected.

If an error is encountered in the SQL Statement, the system will raise this error on the screen if you clicked the Preview Grid button and both Active and Execute when Previewing Grid check boxes are selected. Errors in the Before SQL will stop processing the alert grid if Abort on Failure is selected which is the default. If the alert management job was running and found the error, then the error would show in the history of the alert on the History tab.