On 26 August 2012 21:00, salt <writemesaltworth(a)gmail.com> wrote:
Hi Laune,
Please find the java method below..
Apart from such trivial omissions as method name, parameter list and
result
type...
-W
int statusApass=0;
int statusBpass=0;
for(int i = 0;i<policy.getList().size();i++)
{
if(policy.getList().get(i).getChar().equals("A")||policy.getList().get(i).getChar().equals("B"))
{
System.out.println("STEP`1"+policy.getList().get(i).getChar());
if(policy.getList().get(i).getChar().equals("A"))
{
statusApass =1;
for(int j=0;j<=i;j++)
{
if(policy.getList().get(j).getChar().equals("AA"))
{
statusApass=0;
}
}
}
else
if(policy.getList().get(i).getChar().equals("B"))
{
statusBpass=1;
for(int z=0;z<=i;z++)
{
if(policy.getList().get(z).getChar().equals("BB"))
{
statusBpass=0;
}
}
}
}
if(statusApass==1||statusBpass==1)
{
System.out.println("policy"+policy.getList().get(i).getQty()+","+"policy"+policy.getList().get(i).getChar());
break;
}
}
Thanks
Salt
--
View this message in context:
http://drools.46999.n3.nabble.com/Getting-Latest-Matching-Fact-tp4019345p...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users