[rules-users] Creating HashMap object in rules

Wolfgang Laun wolfgang.laun at gmail.com
Mon Nov 5 13:15:30 EST 2012


This line is in error:

   $testObj.getResult().add($rule.put(drools.getRule().getName(), $result));

You should use

   $rule.put(drools.getRule().getName(), $result);
   $testObj.getResult().add($rule);

instead.

-W

On 5 November 2012 17:41, himansu.nayak <himansumca at gmail.com> wrote:

> Hi Esteban,
> Values of @{Result1}, @{Result2} & @{Result3} are unique values in my excel
> and they are not null, but when i try to get the hashmap(i.e. $rule) from
> array list(i.e $testObj.getResult() return an array list) in my java code
> it
> just return null as if the Map <String, Map>$rule = new HashMap<String,
> Map>() is completely ignored when it comes out of drools working memory.
>
>
>
>
> -----
> Thanks...
> Himansu
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Creating-HashMap-object-in-rules-tp4020690p4020704.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20121105/d97ec4ad/attachment.html 


More information about the rules-users mailing list