Hello Saurabh,
which types of resources do you specify in your changeset.xml?
Also try to debug ResourceChangeScanner by adding following line at the
begining of your code:
SystemEventListenerFactory.setSystemEventListener(new
PrintStreamSystemEventListener(System.out));
Jiri Svitak
On 03/23/2012 07:51 AM, Saurabh wrote:
Hi ,
I am trying to understand KnowledgeAgent functioality.
but i am facing following issue
ResourceChangeScanner is scanning the change resource and building the
Knowledgebase but still firing previous rules.
I am using these line of codes
File fxml = new File("change-set.xml");
kbase = KnowledgeBaseFactory.newKnowledgeBase();
ResourceChangeScannerConfiguration sconf =
ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
sconf.setProperty("drools.resource.scanner.interval", "2");
ResourceFactory.getResourceChangeScannerService().configure(sconf);
KnowledgeAgentConfiguration aconf =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
aconf.setProperty("drools.agent.scanDirectories", "true");
aconf.setProperty("drools.agent.useKBaseClassLoaderForCompiling",
"true");
aconf.setProperty("drools.agent.scanResources", "true");
aconf.setProperty("drools.agent.newInstance", "true");
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("test
agent", kbase, aconf);
System.out.println("test agent:" + kagent.getName());
kagent.applyChangeSet(ResourceFactory.newUrlResource(fxml.toURI().toURL()));
ksession =
kagent.getKnowledgeBase().newStatefulKnowledgeSession();
Thanks ,
Saurabh
--
View this message in context:
http://drools.46999.n3.nabble.com/Facing-problem-in-ResourceChangeScanner...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users