Some extra information. The global is of type Integer. Now if I understand correctly, using "+" on an Integer object is the same as "integer = new Integer(integer.getValue() + 1)". It seems calling new on a global inside the rule file causes the problem, because if I define my own integer wrapper class with a simple set method and use this instead, the problem goes away. Anyone have any suggestions???<br>
<br><div class="gmail_quote">On Mon, Sep 7, 2009 at 9:53 AM, Justin King <span dir="ltr"><<a href="mailto:justin.matthew.king@gmail.com">justin.matthew.king@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>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?<br>
<br>Cheers,<br><font color="#888888"><br>Justin<br>
</font></blockquote></div><br>