When you say the loop works fine, do the System.out's print what you expect?

On 17 July 2012 10:34, ashwindrool <ashwin.khandelwal86@gmail.com> wrote:
Sorry Mike,Laune


I am handling 100thousand records for that i am using CSV file and
converting those records into objects which i am using for further
calculation.

According to my requirement i have loop array inside DRL file

So i wrote following code in .java
* agCsv.setPolCounterList(polCounterList);
 agCsv.setAgentList(agentListArray);

                  // local block end for policy---------------------------------------
                  //firing  all rules from here-------------
                        ksession.fireAllRules();
                     //after firing rules destroying session object
                        ksession.dispose();
                        *

after this  i am executing following rule DRL file

*rule "Loop Test"
    salience 50
        when

        $a:AgentCSVBean()


        then

          for(Integer agentList: $a.getAgentList()) {

           System.out.println("--sam====="+agentList);

      }



end*

Now above loop execute absolutely well but after finishing loop it throws
Error











--
View this message in context: http://drools.46999.n3.nabble.com/How-handle-exception-thrown-while-looping-in-DRL-file-tp4018727p4018732.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users