Setting rule engine configuration properties
To optimize rule execution, you can create a custom configuration resource file to set rule engine configuration properties. You pass the path to this file in the rule project properties.
About this task
You manage engine configuration through the API class IlrResources. An instance of this class contains the configuration properties and their associated values.
When an IlrReflect object is created, it points to a resource bundle. This resource bundle, which is an instance of IlrResources, contains a number of configuration properties. The IlrReflect class is a subclass of IlrDynamicObjectModel. When the IlrDynamicObjectModel object is an IlrReflect object, the resource bundle is used to configure the creation of rule engines.
Engine configuration files must be loaded before the IlrReflect object is used to create the rule engines. Use the methods defined in IlrResources to load the files as shown below.
When an IlrReflect object is created to create the rule engine, it creates a new IlrResources object. You can set an alternative class loader on the IlrResources object to find your custom configuration resource file. To get and set the configuration resource file, use the following methods:
class IlrDynamicObjectModel
{
IlrResources getResources() {...};
void setResources(IlrResources res) {...};
};
Procedure
To set up a configuration resource file: