[rules-users] How handle exception thrown while looping in DRL file
Wolfgang Laun
wolfgang.laun at gmail.com
Tue Jul 17 09:28:30 EDT 2012
Is this exactly (!) what you have in your rule, between 'when' and 'then'?
when
$a:AgentCSVBean()
then
-W
On 17/07/2012, ashwindrool <ashwin.khandelwal86 at gmail.com> wrote:
> 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("--sameeeeeeeeee=====");
> }
> for(Integer agentList: $a.getAgentList()) {
> System.out.println("-==========-");
> if($a.getAgentList() != null ){
> System.out.println("--sam====="+agentList);
> }
> else{
> System.out.println("null");
> }
> }
> System.out.println("after");*
>
>
> Now Execution order is
> f*irst "Before" is getting printed
> thn "Sameeeeeeeee"
> followed by "============="
> *"after"
> "Before"
> "errrrrr"**
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/How-handle-exception-thrown-while-looping-in-DRL-file-tp4018727p4018740.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list