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($
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("-
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
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
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
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
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
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.
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.
>
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
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:
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.
_
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
>
>
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
14 matches
Mail list logo