[rules-dev] KnowledgeBaseEvent on KnowledgeAgent

Mohamed BEN AYED mohamed.ensi at gmail.com
Wed May 26 10:57:10 EDT 2010


hi,

I try every solution but the problem persist, I do the following

KnowledgeAgentConfiguration
aconf=KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
		
	aconf.setProperty("drools.agent.newInstance", "false");
	 KnowledgeBase kbase=KnowledgeBaseFactory.newKnowledgeBase();
        kbase.addEventListener(new KnowledgeBaseEventListener.....);

I add a listener for a KnowledgeBAse 

 KnowledgeAgent  agent =
KnowledgeAgentFactory.newKnowledgeAgent("myagent",kbase,aconf); 

I passed a kbase in the KnowledgeAgent parameter to apply the KnowledgeBase
to this parameter

agent.applyChangeSet(ResourceFactory.newInputStr....);

StatefulKnowledgeSession session=kbase.newStatefulKnowledgeSession();
session.fireAllRules();

what I  get was nothing: the listener was not applyed and the KnowledgeBAse
was not created
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/KnowledgeBaseEvent-on-KnowledgeAgent-tp842269p845072.html
Sent from the Drools - Dev mailing list archive at Nabble.com.


More information about the rules-dev mailing list