If there's no change in the WM, no rule will fire (except for fancy things like
rules with a timer). This is so because that't the whole point of a production
system. It'll have to be a fact, inserted or modified.
-W
On 19/03/2013, wumb <wumb(a)gameduell.de> wrote:
Because it's not a fact, it's a global.
What i basically want to do is to have one rule being fired exactly once
for every call of fireAllRules(). The rule will operate on a global,
that is why i asked the question this way.
What would be the best/simplest way to fulfill that requirement? I know
this can be solved by inserting a fact before calling fireAllRules().
But i am looking for a solution which does not envolve "external" fact
insertion. It should be solved by the rules itself.
Any idea?
On 03/19/2013 02:43 PM, Wolfgang Laun wrote:
> Since there's no way to achieve what you'd like to do:
> why don't you simply retract and reinsert the Calendar
> fact?
>
> -W
>
> On 19/03/2013, wumb <wumb(a)gameduell.de> wrote:
>>
>> Hi,
>>
>> is there a way to make drools re-evaluate the LHS of a rule when using
>> from? What I try to achieve is, that following rule is evaluated for
>> every call of fireAllRules() :
>>
>> global java.util.Calendar cal
>>
>> rule "test"
>> when
>> java.util.Calendar() from cal
>> then
>> System.out.println("here we go");
>> end
>>
>>
>> Drools evaluates the rule only in the first call of fireAllRules().
>>
>>
>>
>> Kind regards
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
--
Winfried Umbrath
GameDuell GmbH
Taubenstrasse 24-25, 10117 Berlin
E-Mail: winfried.umbrath(a)gameduell.de
Germany's largest gaming site
Play here:
http://www.gameduell.de
Sitz der Gesellschaft: Berlin, Geschäftsführer: Kai Bolik, Michael
Kalkowski, Boris Wasmuth
Handelsregister: AG Berlin-Charlottenburg HRB 90891
USt.-Identifikationsnummer: DE 813829498
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users