[jboss-jira] [JBoss JIRA] Closed: (JBRULES-1457) please support containment test for map keys

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Thu May 19 17:03:02 EDT 2011


     [ https://issues.jboss.org/browse/JBRULES-1457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edson Tirelli closed JBRULES-1457.
----------------------------------



> please support containment test for map keys
> --------------------------------------------
>
>                 Key: JBRULES-1457
>                 URL: https://issues.jboss.org/browse/JBRULES-1457
>             Project: Drools
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: drools-compiler
>    Affects Versions: 4.0.4
>         Environment: any
>            Reporter: Godmar Back
>            Assignee: Edson Tirelli
>             Fix For: 5.2.0.CR1
>
>
> Using MVEL as the language for clauses, there is no way to test whether a map's key contain a value.
> For instance:
> rule "number 1"
> when
>     e : S(map.keySet() contains "x")
> then
>     System.out.println("rule number 1");
> end
> leads to a syntax error because Drool's parser does not allow function calls ("keySet())" in clauses.
> On the other hand, MVEL (according to Mike Brocks, please read http://jira.codehaus.org/browse/MVEL-53 ) does not provide an operator to test containment in a map's set (or values). He said he's considering adding a shortcut such as .keys and .values in 2.0 and recommended I open a Drools JIRA issue.
> Please provide a way to test for membership in a map's key and value set.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list