<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">perhaps my understanding is not complete about the salience use, but ,<br><br>lets say,<br><br>we have a scenario such as sorting a bunch of reports based on position within the Table&nbsp; and adding the number of pages from each report cumulatively and then generating a final report with total number of pages. The pages have some logic to them and hence they need to added as per the report rank.<br><br>. because I know which report comes after the other, the first time I create the decision table, I have 2 options. <br><br>I can just add the reportnames in each row and let the rowNumber be used as the rank. or I can just assign rank using a separate column . I do not know for sure how to use the row.rowNumber meta data as a column. <br><br>I create a decision Table with Report.name in the condition and set the Report.rank, report.pages in the action
 <br><br>decision table with Report.reportname as a condition and Report.rank as the action<br><br>ReportName&nbsp;&nbsp; Rank&nbsp; pages<br><br>reportA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4<br><br>reportB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2<br><br>reportC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6<br><br>reportD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8<br><br>reportE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5<br><br>based on some previous rules defined in the ruleflow that decide which reports have been created so far, lets say, we end up <br><br>reportA,reportD, reportE being inserted into
 memory. <br><br>I need to first sort reportA, reportD and reportE as per the rank&nbsp; and then add the number of pages (4 + 8+ 5 ) in that order because as per the rank, reportA comes first,&nbsp; reportD comes next and reportE comes next. <br><br>Please ignore the logic as to why pages need to be added so. Its the sorting of reports per the rank that is the issue .<br><br>Is there a way to do this kind of sorting of reports as per rank in another rule or can salience be applied in this case?<br><br>Also, a second question is , how to use row.rowNumber as the rank to maintain the order of the reports in decision table<br><br>Hopefully, my description of the usecase hasnt made it worse than before :)<br><br><br><br>--- On <b>Fri, 9/2/11, Michael Anstis <i>&lt;michael.anstis@gmail.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Michael Anstis
 &lt;michael.anstis@gmail.com&gt;<br>Subject: Re: [rules-users] sorting rows/ules fired in a decision table<br>To: "Rules Users List" &lt;rules-users@lists.jboss.org&gt;<br>Date: Friday, September 2, 2011, 5:58 PM<br><br><div id="yiv27421648"><p>Sorry I do not understand. Can salience be used? Please explain a little more and I will try to help.</p>
<p>sent on the move</p>
<p>On 3 Sep 2011 01:09, "puja nandamuri" &lt;<a rel="nofollow" ymailto="mailto:med_9501@yahoo.com" target="_blank" href="/mc/compose?to=med_9501@yahoo.com">med_9501@yahoo.com</a>&gt; wrote:<br>&gt; Hi,<br>&gt; <br>&gt; I have a question to ask about sorting rules(rows)&nbsp; fired in a decision table<br>
&gt; <br>&gt; I have a decision table that has a action column which is kind of a ranking order.<br>&gt; <br>&gt; based on some conditions, corresponding rows get fired and as a result, we end up with rows being selected not necessarily in any order,but based on the ranking order column of the fired rules, the rows need to be sorted in a subsequent rule . <br>
&gt; <br>&gt; so, lets say, we end up with rows/rules that get fired as follows:<br>&gt; <br>&gt; row7 - ranking order- 3<br>&gt; <br>&gt; row 5- ranking order - 6<br>&gt; <br>&gt; row 3- ranking order - 4<br>&gt; <br>&gt; I would like to sort the rows subsequently as row7,row3, row5 <br>
&gt; <br>&gt; Please note that it is the ranking order that is criteria for sorting, not the row Number .<br>&gt; <br>&gt; How do I accomplish this ? Please pardon if the question is not clear or confusing.<br>&gt; <br>&gt; I will try to present it better .<br>
&gt; <br>&gt; Thanks,<br>&gt; <br>&gt; Ram<br></p>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>rules-users mailing list<br><a ymailto="mailto:rules-users@lists.jboss.org" href="/mc/compose?to=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></blockquote></td></tr></table>