[rules-users] How handle exception thrown while looping in DRL file

ashwindrool ashwin.khandelwal86 at gmail.com
Tue Jul 17 05:34:25 EDT 2012


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.


More information about the rules-users mailing list