Rule Builder > Business Object Models > Working With the BOM Property Sheet > Setting the update Property

The update property allows you to identify the BOM class members that carry out a modification on an object. For example, a BOM attribute can be a virtual attribute that calls a XOM method and this method could change the object. In this case the engine must be notified that it needs to reevaluate the object to update its internal state.

When a method of this type is called, and the update property is set to true, the method call is wrapped in an IRL modify statement. For example, if there is a class Customer that has the methods:

int getBill() alternate="the bill";

void reduceBill() alternate="reduce the bill of {this}";

and the BAL rule is:

  If 
     The bill of customer1 is greater than 300
  Then
      reduce the bill of customer1

and if the reduceBill() method has the update property set to false, the translation to IRL will be:

when
{
?customer1: Customer();
evaluate((?customer1.getBill() > 300));
}
then
{
?customer1.reduceBill();
}

However, if the reduceBill() method has the update property set to true, the translation to IRL will be:

when
{
?customer1: Customer();
evaluate((?customer1.getBill() > 300));
}
then
{
modify ?customer1 { ?customer1.reduceBill(); }
}

To set the update property:

  1. Click a BOM class method or attribute in the BOM Explorer to display its properties in the Property Sheet.
  2. Click the checkbox of the update property to select it.

See Also

BOM Class Properties


Customer Support | Copyright © 1987-2004 ILOG S.A. All rights reserved. Legal terms. PREVIOUS   NEXT