Hi
I've configurated KnowledgeAgent like this and it was working with PKG files
from guvnor, but when i changed path and type of recources to DRL when i
trying to run it on server i have such warning in logs and KnowledgeBase is
empty and no rules are fired:
KnowledgeAgent: impossible to add a map for a null resource! skiping.
KnowledgeBase kbase =
KnowledgeBaseFactory.newKnowledgeBase();
ResourceChangeScannerConfiguration sconf = ResourceFactory
.getResourceChangeScannerService()
.newResourceChangeScannerConfiguration();
sconf.setProperty("drools.resource.scanner.interval",
scannerInterval);
ResourceFactory.getResourceChangeScannerService().configure(sconf);
KnowledgeAgentConfiguration aconf = KnowledgeAgentFactory
.newKnowledgeAgentConfiguration();
aconf.setProperty("drools.agent.scanDirectories", "true");
aconf.setProperty("drools.agent.scanResources", "true");
aconf.setProperty("drools.agent.newInstance", "true");
kagent = KnowledgeAgentFactory.newKnowledgeAgent("changeSetAgent",
kbase, aconf);
kagent.applyChangeSet(ResourceFactory
.newClassPathResource("ChangeSet.xml"));
But this warn I have only with server deploying, when i run this program
just as standalone java program everythink is ok and rules are firing.
My ChangeSet.xml looks like this:
<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
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...
<add>
<resource
source='http://localhost:8083/drools-guvnor/rest/packages/magick/source'
type='DRL' basicAuthentication="enabled" username="admin"
password="admin" />
</add>
</change-set>
P.S. I have to change PKG type to DRL, cause drools ignore calendars clause
in compiled rules from guvnor.
Can you help me to solve this problem?
Thanks, Anton
--
View this message in context:
http://drools.46999.n3.nabble.com/KnowledgeAgent-impossible-to-add-a-map-...
Sent from the Drools: User forum mailing list archive at
Nabble.com.