IBM InfoSphere MDM Custom Domain Hub, Version 10.1If you do not want to use Java™ to create extensions, you can use a rules engine to extend functions.
When you create an event behavior extension through the rules engine, the adapter asserts a rule fact which includes the extension parameters and the current business object; it then calls on the rule engine to activate the rules. The results of executing the rule, including any error status, are ultimately returned to the originating controller method.
For more information on rules and rule engines, see Configuring external business rules.
Implementing business rules by using a rules engine consists of developing the rule script, such as a JRules ilr file, and then registering that file with the extension handler and defining under what conditions to activate rules in that rule set. Depending on the business requirements, you must determine whether or not the full transaction, the working object hierarchy, or both, should be asserted to the rule engine's working memory, or just into the root objects in the hierarchy. If you need complete information for a transaction, you need to pass the whole root object—if a rule execution requires complete data for a transaction, then the transaction-level business object must be passed to the rule engine.
For example, a rule set containing all insurance-specific rules can be created. This rule set is to be invoked whenever the line of business element in the XML header is "Insurance". The "minority-aged owner" rule as described above would look like:
When
ExtParameter(getAction().equals("addContractPartyRole"));
PartyRole(getRoleType().equals("Owner"); getParty().getAge() <=18)
Then
var contractComponent = new (IContract)ContractComponent
var alert = new Alert
alert.setAlertType("Minority Aged Owner")
…
contractComponent.addAlert(alert)
A rule-engine extension is a standard rule-engine file—an ilr file with the default ROV rules engine. The ruleExtensionSet adapter class asserts a rule fact that contains the parameters described above and the current working object as defined in the assert rule parameter.
assertFact(params);
assertFact(params.getTransactionObjectHierarchy());
For example:
when
{
ExtensionParameters( getTriggerCategoryType().equalsIgnoreCase("Post
Transaction");
?txn:getTransactionType();
(txn.equalsIgnoreCase("AddContract")
}
then
{
}
The extension handler determines only which rule file is to be "fired" by the rule engine, not the specific rule within the file.
For more information on coding rules, see the sample iLog rules files provided with InfoSphere® MDM Custom Domain Hub.