[rules-users] Rules Pattern Map['key'] does not work in trunk

Philokratis philokratis at gmail.com
Fri Jan 18 07:45:36 EST 2008


Hi guys,

I have the following rule that does not give the expected result,
I have succesfully tried to bind the map[key] to a variable but again  '=='
does not work as expected.

Is there any error in the rule or the way Map is used ?

Thanks
*

rule* "report3"

 *when
*

MyContainer( map['test1'] == "test1" )

*then
*

System.out.println( drools.getRule());

*end*



*MyContainer definition is *

*public* *class* MyContainer

*implements*

*Serializable {*

*private Map<String, String> map;
*

*public* Map<String, String> getMap() {

*return* *this*.map;

}

*public* *void* setMap(Map<String, String> map) {

*this*.map = map;

}

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080118/130014c1/attachment.html 


More information about the rules-users mailing list