On 26 August 2012 21:00, salt <span dir="ltr">&lt;<a href="mailto:writemesaltworth@gmail.com" target="_blank">writemesaltworth@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Laune,<br>
<br>
Please find the java method below..<br>
<br></blockquote><div>Apart from such trivial omissions as method name, parameter list and result type...<br>-W<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

int statusApass=0;<br>
int statusBpass=0;<br>
<br>
            for(int i = 0;i&lt;policy.getList().size();i++)<br>
            {<br>
<br>
if(policy.getList().get(i).getChar().equals(&quot;A&quot;)||policy.getList().get(i).getChar().equals(&quot;B&quot;))<br>
                {<br>
<br>
System.out.println(&quot;STEP`1&quot;+policy.getList().get(i).getChar());<br>
<br>
                        if(policy.getList().get(i).getChar().equals(&quot;A&quot;))<br>
                                {<br>
                                statusApass =1;<br>
                                        for(int j=0;j&lt;=i;j++)<br>
                                {<br>
                                   if(policy.getList().get(j).getChar().equals(&quot;AA&quot;))<br>
                                       {<br>
                                             statusApass=0;<br>
                                       }<br>
                                }<br>
                                }<br>
                        else if(policy.getList().get(i).getChar().equals(&quot;B&quot;))<br>
                                {<br>
                                statusBpass=1;<br>
                                        for(int z=0;z&lt;=i;z++)<br>
                                {<br>
                                   if(policy.getList().get(z).getChar().equals(&quot;BB&quot;))<br>
                                       {<br>
                                               statusBpass=0;<br>
                                       }<br>
                                }<br>
                                }<br>
<br>
                }<br>
<br>
                if(statusApass==1||statusBpass==1)<br>
                        {<br>
<br>
System.out.println(&quot;policy&quot;+policy.getList().get(i).getQty()+&quot;,&quot;+&quot;policy&quot;+policy.getList().get(i).getChar());<br>
                                break;<br>
                        }<br>
            }<br>
<br>
<br>
Thanks<br>
Salt<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Getting-Latest-Matching-Fact-tp4019345p4019396.html" target="_blank">http://drools.46999.n3.nabble.com/Getting-Latest-Matching-Fact-tp4019345p4019396.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>
</blockquote></div><br>