<div dir="ltr">Thanks guys.. :) </div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/25 Wolfgang Laun <span dir="ltr"><<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If performance is an issue, make sure that the rule doesn't fire repeatedly<br>
or creates some overhead, due to large sizes of Bill.lines and multiple<br>
occurrences of args(0) and args(1) in ascending line order.<br>
<span class="HOEnZb"><font color="#888888"><br>
-W<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 25/11/2013, petert <<a href="mailto:peter.j.troelsen@gmail.com">peter.j.troelsen@gmail.com</a>> wrote:<br>
> I am working on a project, using templates to generate all my rules. I have<br>
> one problem though, I wanna parse my arguments to the template as a<br>
> ArrayList, and do somthing like this:<br>
><br>
> template header<br>
><br>
> ruleId<br>
> args<br>
><br>
> package dk.prks<br>
> import com.poc.entity.Bill;<br>
> import com.poc.entity.BillLine;<br>
> import com.poc.entity.Description;<br>
> import java.util.ArrayList;<br>
><br>
> template "01"<br>
><br>
><br>
> rule "@{ruleId}_@{row.rowNumber}"<br>
> dialect "mvel"<br>
> when<br>
> $bill : Bill ($line : lines) and<br>
> BillLine( service == @{args.get(0)}, $lineNr : lineNr) from $line and<br>
> BillLine( service == @{args.get(1)}, lineNr < $lineNr) from $line<br>
><br>
> then<br>
> $bill.setColor(1);<br>
><br>
> end<br>
><br>
> end template<br>
> However, this is not possible. Furthermore I want to stretch that<br>
> performance is an issue, and i want the generated file to only contain the<br>
> values from the list, and not make any look ups in the array when running<br>
> my<br>
> rules<br>
><br>
><br>
><br>
> --<br>
> View this message in context:<br>
> <a href="http://drools.46999.n3.nabble.com/Drools-templates-header-arguments-tp4026908.html" target="_blank">http://drools.46999.n3.nabble.com/Drools-templates-header-arguments-tp4026908.html</a><br>
> Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
> _______________________________________________<br>
> rules-users mailing list<br>
> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
><br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br></div>