I think that if you modify the kbase, you must recreate all your sessions. You can&#39;t use any session created previous the kbase modification.<div><br></div><div>Best,<br><br><div class="gmail_quote">On Fri, Jun 11, 2010 at 3:32 PM, dgimenes <span dir="ltr">&lt;<a href="mailto:dranelf@gmail.com">dranelf@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
I&#39;m trying to add rules after the Process (workflow) started. That works, but<br>
I wanted the rules to access database data using hibernate.<br>
<br>
So I created a global object to store my EntityManager (I&#39;m using SEAM; it&#39;s<br>
like a Session object).<br>
<br>
The problem is that when I add the KnowledgePackage with the rule that uses<br>
the EntityManager, an exception is thrown because the global is not set.<br>
BUT, if I try to set the global var, I get an exception saying it does not<br>
exist.<br>
<br>
Do you have any idea?<br>
<br>
I&#39;ve seen that when I add the KnowledgePackage to the<br>
StatefullKnowledgeSession the rules are fired, and then I get the exception.<br>
Is there a way to NOT fire the rules after inserting the packages?<br>
<font color="#888888">--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/AddKnowledgePackage-with-rules-that-uses-global-vars-complains-that-the-global-var-is-not-set-tp889311p889311.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/AddKnowledgePackage-with-rules-that-uses-global-vars-complains-that-the-global-var-is-not-set-tp889311p889311.html</a><br>


Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>
</div>