Knowledge Base directory structure
The Knowledge Base uses a defined directory structure to organize its files and executables. The Knowledge Base directories are in the following locations:
- The Knowledge Base used by the cell during run time is located in installationDirectory\pw\server\etc_CellName_\kb on Windows platforms and in $installationDirectory/pw/server/etc/CellName/kb on UNIX platforms.
- The template Knowledge Base resides in the installationDirectory\pw\server\etc\default \standard or $installationDirectory/pw/server/etc/default/standard directory.
Cells are created during installation of a cell or by using the mcrtcell command. For information about this command, see mcrtcell.
The following figure lists the directory structure for a Knowledge Base.
Knowledge Base directory structure
\bin
\A
\h1
\l2
\p4
\s5
\w4
\classes
\collectors
\data
\lib
\records
\rules
In the Knowledge Base, each subdirectory is labeled to indicate the type of files or programs it stores, as listed in the following table:
Knowledge Base subdirectories
Knowledge Base subdirectory | Description |
---|---|
bin | Stores the external scripts that can run during rule processing and actions
The .load file in the bin directory specifies the order in which external scripts or programs are presented to clients. Actions are defined in .mrl files. There is one default file, .load, in the bin directory. |
classes | Stores event class, data class, and interface definitions |
collectors | Stores collector rule definitions |
data | Instances of dynamic data stored in files that are loaded when the cell is initialized |
lib | Stores primitives and functions used in the Knowledge Base
|
records | Stores global record definitions, which store dynamic information across all rule phases |
rules | Stores the rule definitions for the Knowledge Base |
The following table lists the file extensions and directory location for the each of the components contained in a KB.
Knowledge Base file extensions and directories
Component | File extension | Directory |
---|---|---|
Event classes | .baroc | kb\classes |
Data classes | .baroc | kb\classes |
Data instances | .baroc | kb\data |
Global records | .baroc | kb\records |
Rules | .mrl | kb\rules |
Collectors | .mrl | kb\collector |
Action executables | .mrl | kb\bin |
Service model class definitions | .baroc | kb\classes |
Interface classes | .baroc | kb\classes |
Scripts and programs | Not applicable | kb\bin_platform_ |