[rules-users] Is there anything exists in drools rule template for looping of a row in compiled rule template

Michael Anstis michael.anstis at gmail.com
Tue Feb 11 05:22:16 EST 2014


Why would you want to look that line in a single DRL file?

when
$p: Person(age == @{age})
$p: Person(age == @{age})
$p: Person(age == @{age})
$p: Person(age == @{age})
$p: Person(age == @{age})
....
then

Parameter @{age} would take the same value on each iteration.

But, in short, no this is not possible.



On 11 February 2014 09:59, Soumya.plavaga <soumya.bose at plavaga.in> wrote:

> Is there anything exists in drools rule template for looping of a row in
> compiled rule template? As example if I have a rule like -
>
> rule "rule 1"
>
> when
> $p: Person(age == @{age})
>
> then
>
> System.out.println("person is eligible");
>
> end
>
> If I want to repeat the line '$p: Person(age == @{age})' in a loop in the
> compiled drl, is there any ready made component within drools rule template
> to achieve that?
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Is-there-anything-exists-in-drools-rule-template-for-looping-of-a-row-in-compiled-rule-template-tp4028059.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> 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/20140211/681dec06/attachment.html 


More information about the rules-users mailing list