[rules-users] Disable rules at runtime to make sure they get executed only once

Pavel Tavoda pavel.tavoda at gmail.com
Fri Feb 19 08:18:33 EST 2010


Maybe here is some complex support for this but if you use ruleflows
than it's complicated however what about (noob idea):

rule "first - only once"
when
     not RuleXor( name == "first")
     ...
than
     ....
     insert (new RuleXor("first"));
end

On Fri, Feb 19, 2010 at 2:01 PM, Malinda Kaushalye <kaushalye at yahoo.com> wrote:
> Hi All,
> I need to write a set of rules that each get executed only ONCE. However, the conditions are met at different stage of execution as events are coming thru a stream. Therefore I need to disable each rule at different stages.
> I was looking for some mechanism to disable a rule after it gets executed. Something like this.
>
> rule "myExecuteOnlyOnceRule"
>  when
>   //some condition tat evaluate events
>  then
>    this.rule.disable() / disable(drools.getRule())
> end
>
>
> Let me know if you know such a function or a workaround for this issue.
> Cheers,
> Malinda
>
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>




More information about the rules-users mailing list