[rules-users] Discover when a rule isn't more active

Claudio Rainoldi claudio.rainoldi at gmail.com
Tue Jul 29 08:42:29 EDT 2008


i'm sorry i'm a new drools user.. Can you try to be a little more clear?
thanks..


2008/7/29, Ingomar Otter <iotter at mac.com>:
>
> Use logicals.
>
> Am 29.07.2008 um 11:20 schrieb Claudio Rainoldi:
>
>  Hi everyone,
>> isn'it there a way to find when a rule isn't more active.
>> For example if i have this rule:
>>
>>
>> rule "light 2 on"
>> dialect "java"
>> when
>> Light (name=="0/0/2", actualvalue=="1");
>> then
>> System.out.println("luce 2 on");
>> end
>>
>>
>> when someone turn on the light 2 i discover that the rule is fired using
>> an
>> Agenda Event Listener and the method afterActivationFired;
>> But when someone turn off the ligth isn't there a similar way to discover
>> that the rule "light 2 on" isn't more active.
>> My only solution is to use the dual rule:
>>
>> rule "light 2 on_dual"
>> dialect "java"
>> when
>> not (Light (name=="0/0/2", actualvalue=="1"));
>> then
>> System.out.println("luce 2 off");
>> end
>>
>> Isn't there a more sample way to do this?
>> Thanks in advance.
>>
>>
>> Cla
>> _______________________________________________
>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080729/18f5eabf/attachment.html 


More information about the rules-users mailing list