Global records in rules
Global records maintain specified values across rule phases. You can use global records for sharing data between events. For example, you can use a global record to maintain a list of systems under maintenance. You can ignore the new events for one of these systems by using a Filter rule until the system is no longer part of the global record list.
You can query or modify the contents of a global record either from the rule engine or through the mgetrec or msetrec commands. For more information about the mgetrec and msetrec commands, see mgetrec and msetrec.
Global records are created by using .baroc files. The global record files are located in the Records directory of the cell's Knowledge Base.
The syntax for global records is as follows:
DEFINES {
<SlotName> : <SlotType>;
<SlotName> : <SlotType> ;
}
END
Global records are addressed by name, so you must know the name of the global record to use it. You can use global records in an expression, an assignment, or a primitive. Use the following syntax in a rule to refer to a slot listed in a global record:
The following is a simple example of a global record:
UNDER_MAINTENANCE DEFINES {
hosts: LIST_OF STRING ;
}
END