Rulebase Definition Language Fundamentals

To understand a CA Rule Engine rulebase, it is necessary to understand several concepts that are unique to RDL and the CA Rule Engine inference engine. For more information on these concepts, see RDL Rulebase Overview.

Rulebases expressed in RDL are hierarchically organized in three levels:

Domains
	Rulesets
		Rules

Domains, rulesets, and rules are named objects in an RDL rulebase; each may occur multiple times at their respective levels. Domains provide a means of grouping rulebase resources in functional units. Rulebase resources include classes, instances, and rulesets. A rulebase may contain multiple domains, each dealing with a separate aspect of the problem being solved. Rulesets are sets of rules. An RDL ruleset is not to be confused with a RuleExecutionSet in JSR-94 standard, which is really equivalent to a whole rulebase. Rules have a unique structure in RDL, which are based on a decision tree paradigm.

RDL supports classes. Classes are defined by their fields. Classes can be defined at the rulebase level, the domain level and the ruleset level. Classes defined at a higher level are accessible by objects defined in a lower level in the same hierarchy, but not conversely. The classes defined at the rulebase level may be interfaced with client applications. Instances of such classes pass information between the rulebase and client application. Instances can be either statically defined by a class or dynamically created at runtime, e.g. by rules. Additionally, if the rulebase designates a class as an app-creatable class, the client application can dynamically create instances for the class. All instances in RDL must be named.

Each field in a class is described by its collection type and its data type. The collection type can be either atomic or set. The data type can be one of Number, Boolean, String, DateTime, Duration and instance reference. When a RDL instance is instantiated, the state for a field is unknown and remains in that state until it is resolved to a value by a rulebase statement or client operation. At the time of resolution the field will become in the known state. The concept of unknown is fundamental in inferencing in the sense that the goal of inferencing is to use the available rules to resolve the unknown fields.

The purpose for an atomic instance reference field is to hold a reference to an instance of specified class defined in the rulebase. The instance reference type is different from other data types in the sense that it has three possible states: unknown, reference to another valid instance, and a special value, the RDL NULL, to indicate that it is known that that reference does not exist. For example, if a field of a Person class is spouse, the RDL NULL value for that field means that given person does not have a spouse, or is single.

In RDL, domains define critical aspects of how the rulebase will be exposed to the outside world. The domain contains the specification of how the Java client applications will invoke the rulebase. The following aspects of domains define this interaction:

The Java client application must interact with one and only one appshared domain during any given invocation of the executeRules() method. The appshared domain determines which objects the Java application must provide to the inference engine and which objects can be retrieved from the inference engine based on the specified pre and postconditions.

To help the Java programmer understand the structure of the rulebase interface, CA Rule Engine provides an application interface document. This document is obtained as a vendor-specific extension of the rule execution set properties. For more information, see CA Extensions to the JSR-94 Specification and Special Considerations.