Creating and editing temporal triggers
Temporal triggers fire repeatedly based on a specified frequency.
About this task
For example, you can use a temporal trigger to delete
all clear rows (Severity = 0
) from the alerts.status
table that have not been modified within a certain period of time.
To create or edit a temporal trigger:
Procedure
- From the Netcool/OMNIbus Administrator window, select the Automation menu button.
- Click Triggers. The Triggers pane opens.
This pane lists all database, signal, and temporal triggers that are set up.
Tip: To view only one type of trigger, click Show Database Triggers Only, Show Temporal Triggers Only, or Show Signal Triggers Only in the toolbar. - To add a temporal trigger, click Add Temporal
Trigger in the toolbar. The Temporal Trigger Details window opens.
- To edit a temporal trigger, select the temporal trigger
to edit and then click Edit Trigger in the
toolbar. The Temporal Trigger Details window opens.
- Define or edit the trigger setup details as follows:
- Name
- Type a unique trigger name. If you are editing a trigger, you cannot change
the name. Tip: When you create ObjectServer objects, their names must begin with an uppercase or lowercase letter, followed by uppercase or lowercase letters, numbers, or underscore (_) characters, up to 40 characters in length. User, group, and role names can be any text string up to 64 characters in length and can include spaces. Names of ObjectServer objects are case-sensitive.
- Group
- Select the trigger group to which you want to assign the trigger.
- Add New Trigger Group
- Click this button if you want to create a new trigger group to which the trigger can then be assigned. The Trigger Group Details window opens. Complete this window and save your changes.
- When you return to the Temporal Trigger Details window, the new trigger group will be added to the Group list. You can then assign the trigger to this trigger group.
- Complete the Settings tab as follows:
- Every
- Define when the trigger must fire. Specify a numeric value and select hours, minutes, or seconds from the drop-down list.
- Priority
- Select a priority that determines the order in which the ObjectServer fires triggers when more than one trigger occurs at this frequency. You can select numbers from 1 to 20, with 1 being the highest priority.
- Debug
- Select this check box to send debugging information to the ObjectServer message log each time the trigger fires.
- Enabled
- Select this check box to activate the trigger and make it available for use. Clear this check box to create the trigger without activating it at the present time, or to make the trigger unavailable. A disabled trigger does not fire.
- From the When tab, specify an optional WHEN clause that allows you to test for a particular condition before the action is performed. If the condition is not met, the action is not performed. You can use the helper buttons shown to the right of the field to construct the WHEN clause.
- From the Evaluate tab, optionally
build a temporary result set from a single SELECT statement to be
processed during the trigger action that is defined on the Action tab.
Complete the tab as follows:
- Bind As
- Type the name of the temporary table in which to store the result set.
- SQL editor panel
- Type the statement using the format:
- EVALUATE SELECT_cmd
- You can use the SQL helper buttons shown to the right of the SQL editor panel to construct the statement.
- From the Action tab, enter SQL commands
for the trigger.
The body of a trigger contains a set of SQL commands and programming constructs that manipulate data in the ObjectServer. The body of a trigger is enclosed within the keywords BEGIN and END. Each statement, except the last one, must be separated by a semi-colon (;).
You can optionally define (declare) local variables for use within a trigger. A local variable is a placeholder for values used during the execution of the trigger. Local variable declarations within a trigger must be separated by semi-colons (;).
The trigger body has the following syntax:[ DECLARE variable_declaration;...[;] ] BEGIN trigger_statement_list END;
You can use the SQL helper buttons shown to the right of the SQL editor panel to construct the SQL commands.
- From the Comment tab, enter an optional text comment for the trigger. This can be useful to anyone who is trying to understand how the trigger works.
- Save or cancel your changes as follows:
- OK
- Click this button to save the trigger details and close the window. New triggers are added to the Triggers pane.
- Cancel
- Click this button to close the window without saving your changes.