<div dir="ltr">Thanks guys.. :) </div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/25 Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;</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&#39;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 &lt;<a href="mailto:peter.j.troelsen@gmail.com">peter.j.troelsen@gmail.com</a>&gt; wrote:<br>
&gt; I am working on a project, using templates to generate all my rules. I have<br>
&gt; one problem though, I wanna parse my arguments to the template as a<br>
&gt; ArrayList, and do somthing like this:<br>
&gt;<br>
&gt; template header<br>
&gt;<br>
&gt;  ruleId<br>
&gt;  args<br>
&gt;<br>
&gt; package dk.prks<br>
&gt; import com.poc.entity.Bill;<br>
&gt; import com.poc.entity.BillLine;<br>
&gt; import com.poc.entity.Description;<br>
&gt; import java.util.ArrayList;<br>
&gt;<br>
&gt; template &quot;01&quot;<br>
&gt;<br>
&gt;<br>
&gt; rule &quot;@{ruleId}_@{row.rowNumber}&quot;<br>
&gt;   dialect &quot;mvel&quot;<br>
&gt;     when<br>
&gt;       $bill : Bill ($line : lines) and<br>
&gt;       BillLine( service == @{args.get(0)}, $lineNr : lineNr) from $line and<br>
&gt;       BillLine( service == @{args.get(1)}, lineNr &lt; $lineNr) from $line<br>
&gt;<br>
&gt;     then<br>
&gt;       $bill.setColor(1);<br>
&gt;<br>
&gt; end<br>
&gt;<br>
&gt; end template<br>
&gt; However, this is not possible. Furthermore I want to stretch that<br>
&gt; performance is an issue, and i want the generated file to only contain the<br>
&gt; values from the list, and not make any look ups in the array when running<br>
&gt; my<br>
&gt; rules<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context:<br>
&gt; <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>
&gt; Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<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>