Hi Ben,
The kbase that is passed into KnowledgeAgentFactory.newKnowledgeAgent is
used to configure the KnowledgeAgent that is created. The
KnowledgeAgentFactory reads the current contents of the KnowledgeBase and
the configuration of the KnowledgeBase and ensures that future
KnowledgeBases are set up with the same configuration.
This is useful for setting properties that are specific to a KnowledgeBase
which you can not set using the KnowledgeAgentConfiguration class.
Please note the differences between the configuration options on the
following 2 interfaces:
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/apidocs/org/droo...
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/apidocs/org/droo...
I believe the reason why your rules are not executing when you get a
session from the kbase that you provided to the KnowledgeAgentFactory is
because the kbase provided to the KnowledgeAgentFactory is not modified
when the agent is built. Once the agent is built you should use
agent.getKnowledgeBase().newStatefulKnowledgeSession()
You can read more about how to configure KnowledgeAgents in the
documentation section 3.2.6:
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/ht...
The details I mention above are in the text between Example 3.20 and
Example 3.22.
Hope this helps,
Steve
rules-dev-bounces(a)lists.jboss.org wrote on 05/26/2010 10:26:17 AM:
From:
Mohamed BEN AYED <mohamed.ensi(a)gmail.com>
To:
rules-dev(a)lists.jboss.org
Date:
05/26/2010 10:28 AM
Subject:
Re: [rules-dev] KnowledgeBaseEvent on KnowledgeAgent
Sent by:
rules-dev-bounces(a)lists.jboss.org
drools 5.0
--
View this message in context:
http://drools-java-rules-engine.
46999.n3.nabble.com/KnowledgeBaseEvent-on-KnowledgeAgent-tp842269p845146....
Sent from the Drools - Dev mailing list archive at
Nabble.com.
_______________________________________________
rules-dev mailing list
rules-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev