[rules-users] Stateful session and non-existence of Facts

Leonardo Gomes leonardo.f.gomes at gmail.com
Tue Nov 17 08:27:25 EST 2009


Hi Guys,

I have the following situation while running a stateful session with Drools
4.0.7:

- I want to test that a fact with a given state doesn't exist;
- It works fine
- At a certain point I have to retract all facts and reinsert them at the
stateful session - some of them actually changed and I don't want to
recreate the session b/c it's expensive
- Again the fact that didn't exist when I first created the session still
doesn't exist

** Problem: This time the rule that verified the non-existence is not fired
because I didn't insert any fact that would retrigger it.

Rule example:

rule "022"

when

SiteLanguage(language : languageCode)
t : SiteSpecialServiceType(type : specialServiceType)
not SiteLanguageSpecialServiceType(specialServiceType == type, languageCode
== language)
then
                <<consequence>>
end

How could I solve or workaround that?


Thanks in advance,
Leo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20091117/67116051/attachment.html 


More information about the rules-users mailing list