Hello,

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

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
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to