[rules-users] Global variables not retaining changes.

Justin King justin.matthew.king at gmail.com
Sun Sep 6 19:53:39 EDT 2009


Hi,

I currently have a drl file containing two globals, both objects. I
initialize these objects and populate the globals via
StatefulKnoweledgeSessions setGlobal("string", obj) method. During execution
some of the rules update values in these objects (I mostly using them for
keeping a count of the number of times a certain condition has been met). I
wish to periodically get the current value of the globals for use in other
parts of the program, but even though I know for a fact they have been
updated by some rule executions they are always the same value as when I
originally initialized them. Can anyone tell me why this is? And if its
possible to make them retain their value?

Cheers,

Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090907/eb98c304/attachment.html 


More information about the rules-users mailing list