<font size=2 face="sans-serif">Hi Ben,</font>
<br>
<br><font size=2 face="sans-serif">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.</font>
<br>
<br><font size=2 face="sans-serif">This is useful for setting properties
that are specific to a KnowledgeBase which you can not set using the KnowledgeAgentConfiguration
class.</font>
<br>
<br><font size=2 face="sans-serif">Please note the differences between
the configuration options on the following 2 interfaces:</font>
<br><a href=http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/apidocs/org/drools/KnowledgeBaseConfiguration.html><font size=2 face="sans-serif">http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/apidocs/org/drools/KnowledgeBaseConfiguration.html</font></a>
<br><a href=http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/apidocs/org/drools/agent/KnowledgeAgentConfiguration.html><font size=2 face="sans-serif">http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/apidocs/org/drools/agent/KnowledgeAgentConfiguration.html</font></a>
<br>
<br><font size=2 face="sans-serif">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()</font>
<br>
<br><font size=2 face="sans-serif">You can read more about how to configure
KnowledgeAgents in the documentation section 3.2.6: </font><a href="http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/ch03.html#d0e1123"><font size=2 face="sans-serif">http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/ch03.html#d0e1123</font></a>
<br><font size=2 face="sans-serif">The details I mention above are in the
text between Example 3.20 and Example 3.22.</font>
<br>
<br><font size=2 face="sans-serif">Hope this helps,</font>
<br><font size=2 face="sans-serif">Steve</font>
<br>
<br><tt><font size=2>rules-dev-bounces@lists.jboss.org wrote on 05/26/2010
10:26:17 AM:<br>
<br>
> From:</font></tt>
<br><tt><font size=2>> <br>
> Mohamed BEN AYED <mohamed.ensi@gmail.com></font></tt>
<br><tt><font size=2>> <br>
> To:</font></tt>
<br><tt><font size=2>> <br>
> rules-dev@lists.jboss.org</font></tt>
<br><tt><font size=2>> <br>
> Date:</font></tt>
<br><tt><font size=2>> <br>
> 05/26/2010 10:28 AM</font></tt>
<br><tt><font size=2>> <br>
> Subject:</font></tt>
<br><tt><font size=2>> <br>
> Re: [rules-dev] KnowledgeBaseEvent on KnowledgeAgent</font></tt>
<br><tt><font size=2>> <br>
> Sent by:</font></tt>
<br><tt><font size=2>> <br>
> rules-dev-bounces@lists.jboss.org</font></tt>
<br><tt><font size=2>> <br>
> <br>
> drools 5.0<br>
> -- <br>
> View this message in context: </font></tt><a href="http://drools-java-rules-engine/"><tt><font size=2>http://drools-java-rules-engine</font></tt></a><tt><font size=2>.<br>
> 46999.n3.nabble.com/KnowledgeBaseEvent-on-KnowledgeAgent-tp842269p845146.html<br>
> Sent from the Drools - Dev mailing list archive at Nabble.com.<br>
> _______________________________________________<br>
> rules-dev mailing list<br>
> rules-dev@lists.jboss.org<br>
> </font></tt><a href="https://lists.jboss.org/mailman/listinfo/rules-dev"><tt><font size=2>https://lists.jboss.org/mailman/listinfo/rules-dev</font></tt></a><tt><font size=2><br>
</font></tt>