Hi, I am trying to list out the globals but I am confused, please help.

I wrote this line in my drl file
((MapGlobalResolver)drools.getKnowledgeRuntime().getGlobals()).getGlobals()
this gives me ONLY the globals that I have added in drl through
drools.getWorkingMemory().setGlobal()
this does not list out the globals that I have added in java before firing
the rules.

Then I tried this line in my drl file
drools.getKnowledgeRuntime().getKnowledgeBase().getKnowledgePackages().getGlobalVariables()
this gives me BOTH the globals that I have added in drl through
drools.getWorkingMemory().setGlobal()
AND the globals that I have added in java before firing the rules.

My question is, to list the useable globals in the current rule, what is the
correct method call?

Thank you



--
View this message in context: 
http://drools.46999.n3.nabble.com/Ways-to-list-the-globals-tp4023616.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to