Rule folders are similar to the directories that divide a computer's hard
drive in that they split a large number of files into conceptual units. The
rule folder adds its path to the fully qualified rule name, and allows two
names with the same name to be stored in separate folders effectively avoiding
name collisions. Like the directories on a hard drive, a rule folder can contain
any number of rules of rule folders.
Although you can name the folders whatever you deem appropriate, it is
recommended that you follow the Java package naming convention.
That is, base the names on the domain name of the organization where the rules
are developed. So, ACME's isSeniorCitizen
rule's fully-qualified
rule name, or full rule name, might be com/acme/ageRules/isSeniorCitizen
.
In this example, the com/acme
path would be used by all rules
developed by ACME, and the ageRules
folder would be used to separate
"age" rules from rules of other kinds. Note that the root folder has no
name meaning that fully-qualified path names never start with a '/'.
When using the Rule Management APIs, a rule folder contains instances of IRules
,
which are also referred to as "rules". To begin working with rules, get the
root rule folder by using the method getRootFolder
on class RuleMgmtHelper
.
From the root rule folder you can add, delete, and retrieve folders and rules
using methods on this interface.