BOM value type extensions
You can define BOM value type extensions to create specific value types, which you can then enter as part of a business rule.
BOM value type extensions are value types that you define to create a specific kind of value. Values are literals of a given type, such as number, date, or string. For values that require a specific interpretation of a standard type, such as days of the week, you must define your own value type to handle the values properly. You normally enter a value as part of a business rule.
You can extend your BOM value types using:
A Value descriptor, which you use to describe a value so that all values of this type are displayed and edited in the same way; you declare a value descriptor if you want to extend a BOM value class
A Value info, which you use to describe how a value behaves when it is used in a phrase; you declare a value info if you want to extend a BOM value member
Note that a value info must reference an existing value descriptor, because it edits, tests, and translates the value represented by the value descriptor. If you declare a value info for a BOM member, the value descriptor must be of the same type as the BOM member.
If you declare a value descriptor, you can then define:
A Value editor, to provide a graphical editor for the value
A Value translator, to translate the value into IRL
If you declare a value info, you can define a value editor and a translator. You can also define:
A Value provider, to provide a list of values in the rule editor for users to select from
A Value checker, to check that a user-entered value is valid
Do not declare a value editor and a value provider at the same time. If you do, the rule editor does not know whether to display a list of values or to allow data entry.
The following diagram illustrates the different elements you can use with a value descriptor and a value info. None of these elements are obligatory.

Value descriptor
If you want to extend a BOM value class, you must declare a value descriptor. You use a value descriptor to:
Represent the value as a parsable, locale-specific regular expression. The representation must provide a unique textual description of the value and cannot be used by more than one value descriptor
Provide a persistent text form (locale-independent) and a localized text form for the value
Define a default value for the value
Check manually entered values and report an error
Transform the text representation of the value into or from an object representation
A value descriptor is an implementation of the interface IlrValueDescriptor, for example:
- IlrStringValueDescriptor: represents a literal string ("...")
- IlrNumberValueDescriptor: represents a number (Integer and Float)
- IlrFullDateValueDescriptor: represents a full date (date and time)
- IlrShortDateValueDescriptor: represents a short date (date only)
- IlrTimeValueDescriptor: represents a time
You can also create a new value descriptor from a predefined value descriptor. You can use any of the predefined value descriptors in ilog.rules.brl.value.descriptor. You must extend the predefined value descriptor for the new value descriptor to inherit all its features.
You can also reuse a predefined value descriptor to create:
A decorated value descriptor. You use a decorated value descriptor to add a prefix or a suffix to a value. For example, if you want to use the Number value descriptor to describe a percentage, you 'decorate' it by adding % as a suffix in the Number value descriptor label.
Specific number and string values. For example, if you want to associate specific values to a BOM type Country, you can attach an IlrStringifiedValueDescriptor to this class. Values of this type then have following format: the country "US" or the country "Japan". The value is built from a basic value type (in this case a String) prefixed with the verbalization of the class (in this case the country).
Value info
You must declare a value info if you want to extend a BOM value member. Use a value info when you want to customize the way a value is used, edited, and checked, in the context of a placeholder in a specific phrase.
The value info also provides a Value editor, a Value provider, a Value checker, and a Value translator.
A value info is an implementation of the interface IlrValueInfo.
Value editor
A value editor is a Java™ class that defines how to enter and display values of a particular type in a business rule. You use a value editor to edit a value and, if required, to specify a default value. It edits an object that represents the value, not the text. You can use a value editor with all types of rule editors (Intellirule editor, guided editor, Web Intellirule Editor, and Web guided editor).
A value editor is associated with a value descriptor because, after editing the value, you must insert the text representing the value into the edited rule.
A value editor is an implementation of the interface IlrValueEditor.
For Rule Designer, the value editor must implement the interface IlrValueEditorComponent. You use this interface to access a graphical component to edit the value. All graphical user interfaces must use the Swing component to be used in the Intellirule Editor and the guided editor.
For Decision Center, the value editor must implement one of the following Java interfaces:
Web guided editor: IlrWValueEditorComponent
Web Intellirule editor: IlrClientScriptValueEditorProvider
Value provider
You use a value provider to set up a predefined set of values for a rule editor drop-down list, where you have declared a value info for a placeholder in a phrase. Predefined values are calculated on demand.
If the set of predefined values is hierarchical, you can insert only leaf values into a rule. The list of possible values depends on the context of the value and what the rule author inserted before the value. The context here relates to the node in the (deprecated) Abstract syntax tree where the value is inserted.
A value provider is an implementation of the interface IlrValueProvider.
Operational Decision Manager provides a predefined value checker for enumerated domains in the BOM. If you attach an enumerated BOM domain to a BOM class, a BOM attribute, or a BOM method parameter, the values defined in the domain are automatically available in a business rule through a dedicated value provider.
Value checker
A value checker checks the validity of a value according to the context in which it is used. The context here relates to the node in the (deprecated) Abstract syntax tree that represents the value, because the value checker is called after the abstract syntax tree is built, but before the rule is parsed. If a value is not valid in the context in which it is being used, the value checker reports an error by populating IlrValueError. The instance of IlrValueError is then given as a parameter in the value checker API (implemented by the user), to return the severity of and the reason for the error.
A value checker is an implementation of the interface IlrValueChecker.
Operational Decision Manager provides a predefined value checker for all placeholders in the verbalization of integer BOM method arguments or attributes. A business rule language makes no distinction between integers and floating point numbers, so if such a placeholder uses a floating point literal value, the value checker reports an error.
When a BOM enumerated domain is declared on a BOM attribute, BOM method argument or return value, a dedicated value checker is automatically provided to check that the input values are part of the declared enumerated domain.
Value translator
A value translator provides a mechanism for generating IRL source code from a literal value. Operational Decision Manager provides several predefined and preregistered value translators. They are preregistered in the boot BOM for BOM types like strings, numbers, and dates.
A value translator is an implementation of the interface IlrValueTranslator.