<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. &nbsp;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. &nbsp;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>
&gt; From:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Mohamed BEN AYED &lt;mohamed.ensi@gmail.com&gt;</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; To:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; rules-dev@lists.jboss.org</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Date:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; 05/26/2010 10:28 AM</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Subject:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Re: [rules-dev] KnowledgeBaseEvent on KnowledgeAgent</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Sent by:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; rules-dev-bounces@lists.jboss.org</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; <br>
&gt; drools 5.0<br>
&gt; -- <br>
&gt; 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>
&gt; 46999.n3.nabble.com/KnowledgeBaseEvent-on-KnowledgeAgent-tp842269p845146.html<br>
&gt; Sent from the Drools - Dev mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; rules-dev mailing list<br>
&gt; rules-dev@lists.jboss.org<br>
&gt; </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>