Integrating initial values for properties

You use initial values to compute the initial value of a business-specific rule property. To integrate them into Decision Center, you must repackage the Decision Center archive.

About this task

You compute the initial value of a business-specific rule property with property initial values (see Computing initial values for properties).

Calls to IlrInitialValue are forwarded by the default session controller (IlrDefaultSessionController). If you define your own controller class and want to have IlrInitialValue called anyway, you must subclass IlrDefaultSessionController so that the method IlrDefaultSessionController.getInitialValue() is called.

Procedure

To integrate property initial values into Decision Center:

  1. Package your IlrInitialValue implementation into a JAR.
  2. Create a preferences.properties file that specifies the mapping between the initial value key and your IlrInitialValue class, and include that file in the JAR file that contains your implementation:

    decisioncenter.MyInitialValue.class=mycompany.MyInitialValueClass

    where MyInitialValue 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.MyInitialValue.class -Dvalue=mycompany.MyInitialValueClass

  3. 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.
    Note:

    For information on how to repackage the Decision Center archive, see Repackaging the Decision Center archive.

  4. Deploy the Decision Center archive.

Results

You have now integrated property initial values into Decision Center.