You create a decorated value descriptor if you want to
decorate an existing value descriptor with a prefix, a suffix, or
both.
About this task
When you create a decorated value descriptor, you do not need to do anything specific to
integrate it into Rule
Designer or
Decision
Center.
Procedure
To create a decorated value descriptor:
- Open the BOM Editor in Rule
Designer.
- In the BOM Editor, open the class for which you want to
define the value descriptor.
- In the Custom Properties section,
click Add.
A new custom property
is created.
- In the Name column, click newProp and
then type valueDescriptor.
- In the Value column, type <BOM
type fully qualified name>#Decorated(<BOM target type fully
qualified name>).
In your BOM, you have a
class named sample.Dollar that represents the Dollar
currency. You want to attach a text representation of this currency.
A Dollar is a number decorated with the sign $.
To
provide a text representation for this Dollar value type, you add
two custom properties to the BOM class sample.Dollar:
A property to specify that the value is decorated:
valueDescriptor
= sample.Dollar#Decorated(ilog.rules.brl.Number)
A property to specify the prefix to be used:
DecoratedValueDescriptor.prefix
= $
Results
You can now use the decorated value descriptor in Rule
Designer and Decision
Center.