Dynamic data in rules


Dynamic data objects are BAROC objects that are used as parameters within rules and as structured objects in the Service Information Management model. Like events, they are stored in the persistent repository of the cell. The cell uses dynamic data objects to process rules.

By using dynamic data, you can avoid writing several similar rules that differ only by values that can be stored within the data instances. When the cell evaluates a generic rule that references dynamic data, it queries a dynamic data table to access the relevant data.

In the following example, the business impact of an unavailable application determines the severity level of the associated APP_DOWN event. On receiving an APP_DOWN event, an Execute rule retrieves the first instance of SEVERITY_BY_APP_DOWN that matches the application name set in the APP_DOWN event. The instance contains the appropriate severity to associate with the application, so the rule makes the assignment as shown:

Execute rule by using dynamic data

execute Set_App_Down_Severity :
  APP_DOWN ($AD)
     using SEVERITY_BY_APP_DOWN ($SBAD)
        where [$SBAD.application == $AD.application]
     when $AD.status == OPEN
      {
        $AD.severity = $SBAD.severity;
      }
END

The rule searches the data instances to find the instance of the application in the APP_DOWN event. When a match is found, the rule stops searching the data instances and continues processing with the matching instance, as follows:

The data must be populated beforehand; otherwise, the rule engine does not find an instance and the remainder of the rule is skipped. In other words, when the using clause is present in a rule, it must return data or the selection fails, and the remainder of the rule is skipped. You can also define dynamic data instances by using the Dynamic Data Editor. For instructions, see Dynamic-data.

SEVERITY_BY_APP_DOWN ;
   application = mail ;
   severity = CRITICAL ;
END
Warning

Note

By using an index dramatically improves the performance of a query in the data repository. If key slots are present in the Event Condition Formula (ECF), optimization is performed on the data query. For information about indexes, see Indexes-in-rules.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC ProactiveNet 9.6