Package COM.TIBCO.hawk.config.rbengine.rbmap
Definition of a rulebase map
RulebaseMap is a configuration object that maps rulebases to agents. It is used when an agent is running in a manual configuration mode to determine which rulebases should be loaded on the agent.The RulebaseMap configuration object has three primary components:
- Group mapping - to organize agents into groups for the purpose of rulebase assignment.
- Rulebase mapping - to map rulebases to agents or groups of agents.
- Command mapping - to delegate the rulebase mapping function to an external command.
Group Mapping
There are two types of groups in rulebasemap, user defined and automatic. A user defined group is a group that a user create while automatic groups are groups that agents automatically belong to. A user can defines the names of user-defined groups but not that of the automatic groups. A user defined group name begin with "+" and automatic group names begin with "++".A user defined group can be composed of a number of agents, groups, or combination thereof. A user defined group may have both user defined and automatic groups as elements in their definition.
The OS groups are automatic groups whose names correspond to the operating systems of the machines the agents are running on. The OS groups have the form "++OSName" where OSName is the value of the Java system property "os.name". Examples of automatic group names are ++Windows 2000, ++Solaris, ++HPUX, etc. Examples of user defined group names are "+servers", "+clients".
There is a special automatic group referred to as the ALL group. The ALL group includes every TIBCO Hawk Agent and is simply named "++".
Example:
+group1 agent1 agent2 agent3
+groupX agentX +group1
In the preceding example, agentX and +group1 belong to +groupX, and agent1 belongs to +group1 as well as +groupX.
Rulebase Mapping
Rulebase mapping defines which rulebases are assigned to an agent or a group. It defines which agents or groups use a particular rulebase. In the following rulebase mapping:
rulebase1 agent1 agent2 ++Windows
rulebase2 +group2
rulebase3 agent2 +group2
rulebase4 ++
agent1 uses rulebase1 and agents in +group2 uses rulebase2 and rulebase3. All agents uses
rulebase4 as rulebase4 maps to "++", the all group. All agents that are running under Windows operating system
will uses rulebase1.
Command Mapping
Command mapping allows an external command or executable (script) to be specified for an agent or a group. If specified, it is executed and the returned string is parsed on white space to indicate which rulebases to load. When the executable is invoked, the agent name and its automatic group name are passed as parameters to the command.The use of command mapping depends on a setting of one of the attributes of the RulebaseMap. The commands mapping can be used as the only mechanism to generate the rulebases to be loaded or as a supplement to the groups and rulebases mapping of the RulebaseMap. It can also be ignored for generating the rulebases.
Agent processing of RulebaseMap
If the agent (more specifically, the RulebaseEngine MicroAgent) is configured in one of the manual configuration mode, it will attempt to load the RulebaseMap configuration object after initialization. It will first determine which automatic groups it belongs to. Then it will read and process the group definition component to determine which user defined groups it is also a member of. Next it will process the rulebase mapping component to determine which rulebases it should load. Finally it will use the command mapping mechanism, if one is specified, to get the names of additional rulebases it should load. Once the rulebase map has been fully processed, the agent will proceed to load the target rulebases.Note that the -rulebases option supported by the agent (RulebaseEngine MicroAgent) can be used together with the RulebaseMap to specify additional rulebases.
Related Documentation
For more details on rulebases and interaction of schedule with rulebase engine, please refer to:- Since:
- TIBCO Hawk 4.1.0