To integrate and declare property callbacks, you must repackage
the Decision Center archive.
About this task
You modify the behavior of a business-specific rule property
with property callbacks (see Creating property callbacks).
Calls to IlrPropertyExtension are
forwarded by the default session controller (IlrDefaultSessionController). If you define
your own controller class but still want to have IlrPropertyExtension called,
you must subclass IlrDefaultSessionController and
call the super methods, such as getPossibleValues, isHidden, isEditable,
or isValid.
Procedure
To integrate property callbacks into Decision Center:
- Package your IlrPropertyExtension implementation
into a JAR.
- Create a preferences.properties file
that maps the name of your callback in the extension model file with
your IlrPropertyExtension class, and include that
file in the JAR file that contains your implementation:
decisioncenter.propertyExtension.class=mycompany.MyPropertyExtensionClass
where propertyExtension is
the key you specified for your implementation in the extension model
file.
You can also set this preference as a Decision Center configuration
parameter using the set-config-param Ant task:
ant
set-config-param -Dkey=decisioncenter.propertyExtension.class -Dvalue=mycompany.MyPropertyExtensionClass
- Repackage the Decision Center archive
with the
repackage-ear command. In the repackage-ear command,
use the -DadditionalJars argument to specify the
JAR file containing your custom class.
- Deploy the Decision Center archive.
Results
You have now integrated callbacks on properties into Decision Center.