| ILOG JRules User Guide > Creating Rule Projects > Tasks > Defining How Business Elements Map to the XOM > Mapping Classes > Adding Tests to Filter Out Class Instances |
Adding Tests to Filter Out Class Instances |
PREVIOUS NEXT |
As the mapping from a business class to an execution class may become more complex (for example several business classes may be mapped to one execution class), you may need to specify a tester to test the instances of the execution class.
To add a tester to the class mapping using IRL mapping:
this to represent the current object.
For example, if there is a business class called RichCustomer in your BOM, corresponding to an execution class Customer with the attribute money greater than 100000:
Extender mapping can be used to add a tester to class mapping.
To add a tester to the class mapping using extender mapping:
tester returning a Boolean and taking the execution class as parameter.
For example, in the case of the RichCustomer business class corresponding to an execution class Customer:
Customer
RichCustomerExt (there are no naming conventions for this class)
tester, returning a boolean and taking Customer (the execution class) as its parameter.
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |