Creating a value descriptor

You use a value descriptor to provide a literal value representation for your BOM types.

About this task

You can provide a literal value representation for your business-specific BOM types with a value descriptor. You declare a value descriptor if you want to extend a BOM value class. You can create a completely new value descriptor, or create one by reusing a predefined value descriptor.

Procedure

To create a new value descriptor:

  1. Extend the class IlrAbstractValueDescriptor.
  2. Open the BOM Editor in Rule Designer.
  3. In the BOM Editor, open the class for which you want to define the value descriptor.
  4. In the Custom Properties section, click Add to create a new custom property.
  5. In the Name column, click newProp and then type valueDescriptor.
  6. In the Value column, type the key that you want to use in Rule Designer or Decision Center to reference your interface implementation.

Results

You now have a value descriptor, which you must integrate into the required Operational Decision Manager modules.

Integration into

Rule Designer

Integration into

Decision Center

Create a Rule Designer plug-in with a value descriptor extension point.

Integrating a value descriptor into Rule Designer

Sample: Modified BOM core types

Repackage the Decision Center archive to integrate and declare the value descriptor.

Integrating a value descriptor into Decision Center

Reusing a predefined value descriptor:

You can use the following predefined value descriptors:

The most common way to reuse a predefined value descriptor is to use a decorated value descriptor. 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 label of the Number value descriptor. You use the value descriptor IlrDecoratedValueDescriptor to add a prefix or suffix to an existing value descriptor.

You can use a predefined value descriptor to create 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). Similarly, you can use a value descriptor to clarify number values, by prefixing the value label with the name of the value you want to represent. You use the value descriptor IlrNumberifiedValueDescriptor to clarify number values.