In WSO2 ESB registry I have a DRL file
/opt/config/rules.drl
rule ""
when
...
then
...
end
I want to use this file to fire Drools rules using a custom mediator with Kie
DroolsMediator.java
class DroolsMediator extends AbstractMediator {
public boolean mediate(MessageContext context) {
KnowledgeBuilder builder...
URL url = new URL("path/to/registry/rules.drl");
builder.add(ResourceFactory.newUrlResource(url), ResourceType.DRL);
...
}
}
I have tried to get as a property but with no success:
<property name="REGISTRY-VALUE"
expression="get-property('registry', '/opt/config/rules.drl')"/>
What approach should I take to passing registry items into custom mediators?