Hi,
I'm trying to use change-set.xml, which pionts to a drl file.My code is
try {
url =new URL("file:config/change-set.xml");
} catch (MalformedURLException e) {
e.printStackTrace();
}
kagent = KnowledgeAgentFactory.newKnowledgeAgent( "MyAgent" );
kagent.applyChangeSet( ResourceFactory.newUrlResource( url ) );
kbase = kagent.getKnowledgeBase();
ksession= kbase.newStatefulKnowledgeSession();
sconf
=ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
sconf.setProperty( "drools.resource.scanner.interval", "10" );
ResourceFactory.getResourceChangeScannerService().configure( sconf );
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();
ksession.insert(object);
ksession.fireAllRules();
and my change-set.xml is:-
<?xml version="1.0" encoding="UTF-8"?
<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
='file:config/Rule.drl' type='DRL'
basicAuthentication='enabled' username='admin'
password='admin'></resource
</add
</change-set
This code worked without any exception, but the rule is not executing. I
tried without changeset.xml and rule worked properly.
What is wrong?
Thanks
--
View this message in context:
http://drools.46999.n3.nabble.com/Rule-not-working-with-Change-set-xml-tp...
Sent from the Drools: User forum mailing list archive at
Nabble.com.