[rules-users] Rule activation when using from
wumb
wumb at gameduell.de
Tue Mar 19 10:30:58 EDT 2013
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 at 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 at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
--
Winfried Umbrath
GameDuell GmbH
Taubenstrasse 24-25, 10117 Berlin
E-Mail: winfried.umbrath at 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
More information about the rules-users
mailing list