Global records in rules

Global records are persistent records and they are useful in maintaining specified values across rule phases. They are structured global variables that store records according to the slot type. 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.

Note

Global records maintain their information when the cell is stopped and restarted.

The syntax for global records is as follows:

RECORD <RecordName>
   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:

$<RecordName>.<SlotName>

Examples for persistent global records

Example 1

RECORD
   UNDER_MAINTENANCE DEFINES { 
      hosts: LIST_OF STRING ; 
   }
END

Example 2

RECORD 
	ADMIN_OPTIONS DEFINES 
   		{
      		all_of_propagation_list: LIST_OF STRING, default = ['IAC'];
      		IAC_enabled: MC_YESNO, default = 'YES';
      		os_class: ADMIN_OS_CLASS, default = UNKNOWN;
      		object_type: STRING;
      		default_read: LIST_OF STRING, default = ['BPPM Administrators','BPPM Model Administrators', 'BPPM Monitoring Administrators','Cloud Administrators' ,'Service Administrators'];
      		default_write: LIST_OF STRING, default = ['BPPM Administrators','BPPM Model Administrators', 'BPPM Monitoring Administrators','Cloud Administrators' ,'Service Administrators'];
      		start_skip_flag: MC_YESNO, default = 'NO';
      		id: STRING ;
   		}
END
Was this page helpful? Yes No Submitting... Thank you

Comments