Jason,
Your's sound slightly different in that you have not been able to
successfully fire up your KnowledgeBase at all.
Mine works, but fails once an invalid DRL file is read.
In any case, I am not use PKG for my ChangeSet resources:
<change-set
xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd' >
<add>
<resource source='file:C:/Transformations.drl' type='DRL'
/>
<!--resource
source='classpath:bass/enrichment/rules/Transformations.drl' type='DRL'
/-->
</add>
</change-set>
I am creating the KA as follows:
KnowledgeAgentConfiguration agentConfig =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
agentConfig.setProperty("drools.agent.newInstance", "false");
agent = KnowledgeAgentFactory.newKnowledgeAgent("MyAgent",
agentConfig);
kaListener = new KnowledgeAgentEventListenerImpl();
agent.addEventListener(kaListener);
agent.applyChangeSet(ResourceFactory.newClassPathResource("rules/ChangeSet.xml"));
agent.monitorResourceChangeEvents(true);
ResourceChangeScannerConfiguration scannerConfig =
ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
scannerConfig.setProperty("drools.resource.scanner.interval",
"5");
ResourceFactory.getResourceChangeScannerService().configure(scannerConfig);
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();
I'll keep you posted if I hear anything.
- Eric
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/KnowledgeAgent-Change...
Sent from the Drools - User mailing list archive at
Nabble.com.