[rules-users] Dynamic Rules

Edson Tirelli ed.tirelli at gmail.com
Mon Feb 8 14:47:36 EST 2010


   Yap,

when
    AccountRulesConfig( $lowBalance : lowBalance )
    Account( balance < $lowBalance )
then
...
end

   Edson

2010/2/8 Glenn Macgregor <gmacgregor at pocketkings.ie>

>  Hi All,
>
>
>
> Just getting started using Drools and I have a question about dynamic
> rules. I have written a simple application based on one of the tutorials.
>
>
>
> *Rule:*
>
> rule “basic rule”
>
>                 when
>
>                                 Account($balance : balance < 100)
>
>                 then
>
>                                 System.out.println(“Account balance: “ +
> $balance + “ is less than 100“);
>
>                 end
>
>
>
>
>
> This rule works fine in my test application but is there a way to replace
> the static 100 with a dynamic value like, AccountRulesConfig.lowBalance,
> basically testing against the value of another object rather than a static
> value?
>
>
>
> Thanks
>
>
>
>  Glenn
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100208/0ebdc67a/attachment.html 


More information about the rules-users mailing list