On Sat, Nov 7, 2009 at 6:00 PM, Leonardo Gomes <leonardo.f.gomes@gmail.com> wrote:
Hello,

I'm feeding my working memory with Maps (unfortunately, this is a
requirement and I can't use beans).


Before people start racking their brains to overcome all the resulting difficulties: Could you please explain what this requirement is meant to achieve?
-W

 
To access the values in this maps I use the following MVEL expression :

               Map ( this["airportCode"] == "GIG"
                       , this["numberOfPassengers"] > "1"
                       , this["class"] memberOf ("BUSINESS", "FIRST") )

And it works fine, except for dates where I get a ClassCastException,
even tough I'm using the right pattern:

Map ( this["departureDate"] > "07-Nov-2009" )   --- fails

Is there anything I need to do to make the dynamic cast of dates work,
in this particular case?

--

Morever, I get NPEs if there's no value for a given key. For example,
the expression Map ( this ["name"] == 'Leonardo' ) would fail if
there's no entry with "name" as the key.

Any help is welcome!

Thanks in advance,
Leo.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users