| ILOG JRules User Guide > Creating Rule Projects > Concepts > BOM and XOM > The BOM to XOM Mapping Mechanism > Extender Mapping |
Extender Mapping |
PREVIOUS NEXT |
Extender mapping is useful if you prefer to use Java rather than IRL. You define an extender class name for a class in the Extender class field of the BOM to XOM Mapping section of the BOM Editor, then the BOM to XOM mapping mechanism looks up for extender elements with the same name as your business elements in the extender class. Therefore, when you create the extender class, make sure you create elements that can be found from the business element name.
This table assumes that an execution class name ExecutionClass has been given to the business class BusinessClass.
Here is an example of an extender class for a BOM class called EventDispatcher.
public class DispatcherExtender {
/**
* This extender method implements
* EventDispatcher.exception(FinancialEvent, String)
*/
public static void exception(GenericObject dispatcher,
GenericObject event,
String message) {
System.out.println("###> Processing Exception : event "
+ event + message + "<###");
}
/**
* This extender method implements
* EventDispatcher.send(FinancialEvent, String)
*/
public static void send(GenericObject dispatcher,
GenericObject event,
String target) {
System.out.println("===> Sending " + event + " to " + target + " <===");
}
}
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |