[rules-users] AddKnowledgePackage with rules that uses global vars complains that the global var is not set

dgimenes dranelf at gmail.com
Fri Jun 11 14:32:11 EDT 2010


I'm trying to add rules after the Process (workflow) started. That works, but
I wanted the rules to access database data using hibernate. 

So I created a global object to store my EntityManager (I'm using SEAM; it's
like a Session object).

The problem is that when I add the KnowledgePackage with the rule that uses
the EntityManager, an exception is thrown because the global is not set.
BUT, if I try to set the global var, I get an exception saying it does not
exist. 

Do you have any idea? 

I've seen that when I add the KnowledgePackage to the
StatefullKnowledgeSession the rules are fired, and then I get the exception.
Is there a way to NOT fire the rules after inserting the packages?
-- 
View this message in context: 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
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list