External rules
The following is a description of the changes to how InfoSphere® MDM uses and handles external rules.
Before OSGi
Rules are defined in an InfoSphere MDM database table containing the rule IDs and the classes that implement those rules. Prior to OSGi, the classes for those rules were loaded by the InfoSphere MDM rule framework using simple Java™ reflection.
With OSGi
<service id="ExternalRuleLocatorService"
interface="com.dwl.base.externalrule.RuleLocator" ranking="XX">
<bean class="com.dwl.base.externalrule.RuleLocatorImpl">
<property name="bpBundle" ref="blueprintBundle"/>
<argument>
<list>
<bean class="Rule class name here"/>
<bean class="Rule class name here"/>
<bean class="..."/>
</list>
</argument>
</bean>
</service>
The bundle defining the RuleLocator service must import the following package com.dwl.base.externalrule. In addition, the RuleLocator service must be exported in the CBA for it to be visible to the MDM rule framework. The service ranking must be set to a value greater than 0 if overriding a default (out-of-the-box) rule implementation.
You must still continue to register the rules and the implementations as described in Rule IDs.