[rules-users] How to make the working memory "clean"?

Wolfgang Laun wolfgang.laun at gmail.com
Thu Mar 1 17:14:48 EST 2012


On 1 March 2012 23:10, shawn <youngxiao121 at hotmail.com> wrote:

> Thank you very much~
> 1- You don't "retract", you can set it to null, same way as set to an
> object.
> Is it in java or in drool?

...? It's a Java object, made visible to DRL code.


> If I understand correct, global variable is not
> really inserted into the working memory,right?

Yes.


> Global just ensure drool can
> see the variable?
>
Yes.


> 2-Several ways, simple is to use KnowledgeSession's getFactHandles, and
> retract them. Or dispose the entire Session, and create another one, which
> might be faster.
> You mean the working memory belongs to the Session not knowledgeBase?
>
Yes.

> Because I have to keep the knowledgebase running all the time, I have to
> ensure each fire() don't leave any useless facts in the working memeory.

Now you know how to.
-W

>


> --
> View this message in context:
> http://drools.46999.n3.nabble.com/How-to-make-the-working-memory-clean-tp3790730p3791905.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120301/1028db28/attachment.html 


More information about the rules-users mailing list