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

2012-07-17 Thread Wolfgang Laun
Is this exactly (!) what you have in your rule, between 'when' and 'then'? when $a:AgentCSVBean() then -W On 17/07/2012, ashwindrool wrote: > HI Laune , > > I did required changes in code by adding if condition before for loop > > *System.out.println("Before"); > if($

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

2012-07-17 Thread ashwindrool
HI Laune , I did required changes in code by adding if condition before for loop *System.out.println("Before"); if($a.getAgentList() != null ){ System.out.println("--samee="); } for(Integer agentList: $a.getAgentList()) { System.out.println("-

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

2012-07-17 Thread Wolfgang Laun
On 17/07/2012, ashwindrool wrote: > Hi Laune, > > > I do wht u asked me, I added print statement before and after for loop > > > >"Before" is getting printed twice and "After" only once. Like this Before Before After ---Error message--- Please be more specific. Add another if statement

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

2012-07-17 Thread ashwindrool
Hi Laune, I do wht u asked me, I added print statement before and after for loop * System.out.println("Before"); for(Integer agentList: $a.getAgentList()) { System.out.println("-==-"); if($a.getAgentList() != null ){ System.out.printl

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

2012-07-17 Thread Wolfgang Laun
Add println() before and after the for(){...} statement. What is the output? How many AgentCSVBean() are inserted? Could one of these have a field agentLsit that is null? -W On 17/07/2012, ashwindrool wrote: > Thnks Laune for ur reply but i tried that condition part even than also its > coming

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

2012-07-17 Thread ashwindrool
Thnks Laune for ur reply but i tried that condition part even than also its coming up with same error -- View this message in context: http://drools.46999.n3.nabble.com/How-handle-exception-thrown-while-looping-in-DRL-file-tp4018727p4018736.html Sent from the Drools: User forum mailing list archi

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

2012-07-17 Thread Wolfgang Laun
Add an if statement testing for a List element being null, e.g., for( Integer agentList: $a.getAgentList()) { if( agentList != null ){ System.out.println("--sam="+agentList); } else { System.out.println( "null element in list" ); } } -W On 17

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

2012-07-17 Thread ashwindrool
Yes Mike, I am getting expected output but after completion of loop it throws error -- View this message in context: http://drools.46999.n3.nabble.com/How-handle-exception-thrown-while-looping-in-DRL-file-tp4018727p4018733.html Sent from the Drools: User forum mailing list archive at Nabble.com.

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

2012-07-17 Thread Michael Anstis
When you say the loop works fine, do the System.out's print what you expect? On 17 July 2012 10:34, ashwindrool 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. >

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

2012-07-17 Thread ashwindrool
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(polCou

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

2012-07-17 Thread Michael Anstis
You haven't asked any questions, merely stated you have an error message. Try posting some supporting code (DRL, related Java etc) it might help people. On 17 July 2012 10:03, ashwindrool wrote: > Thnks for Replying , > > Plz give some idea in above issue. > > -- > View this message in context:

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

2012-07-17 Thread ashwindrool
Thnks for Replying , Plz give some idea in above issue. -- View this message in context: http://drools.46999.n3.nabble.com/How-handle-exception-thrown-while-looping-in-DRL-file-tp4018727p4018730.html Sent from the Drools: User forum mailing list archive at Nabble.com. _

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

2012-07-17 Thread Wolfgang Laun
Thanks for telling us. -W On 17/07/2012, ashwindrool wrote: > Hi, > > I ran enhanced for loop in .DRL file .Its looping perfectly but after > completion of loop its throwing error mentioned as follows: > > > *org.drools.runtime.rule.ConsequenceException: rule: Test > Maadi > >

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

2012-07-17 Thread ashwindrool
Hi, I ran enhanced for loop in .DRL file .Its looping perfectly but after completion of loop its throwing error mentioned as follows: *org.drools.runtime.rule.ConsequenceException: rule: Test Maadi at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handle