[jboss-jira] [JBoss JIRA] Closed: (JBRULES-2131) More flexible DSL: sharing of comparison operators between attributes

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Fri Jun 19 09:14:57 EDT 2009


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

Edson Tirelli closed JBRULES-2131.
----------------------------------

    Fix Version/s: 5.0.1.FINAL
       Resolution: Rejected
         Assignee: Edson Tirelli  (was: Mark Proctor)


This is already possible in the DSL. Just a matter of properly constructing the grammar.

[when][]is less than=<
[when][]- {field:\w*} {operator} {value:\d*}={field} {operator} {value} 

And so on... the order of the entries in the grammar is important.

> More flexible DSL: sharing of comparison operators between attributes
> ---------------------------------------------------------------------
>
>                 Key: JBRULES-2131
>                 URL: https://jira.jboss.org/jira/browse/JBRULES-2131
>             Project: JBoss Drools
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.0.1.FINAL
>            Reporter: Prem Stephen
>            Assignee: Edson Tirelli
>            Priority: Critical
>             Fix For: 5.0.1.FINAL
>
>
> In the following DSL
> [when]There is a Contact with=Contact()
> [when]- age is greater than or equal to {age}=age > {age}
> [when]- age is greater than {age}=age > {age}
> [when]- age is less than or equal to {age}=age <= {age}
> [when]- age is less than {age}=age < {age}
> Now, if I had 10 attributes of type int, then currently from what I could read in my documentation I need to recreate these lines for each of these 10 attributes.
> Hope about a DSL that is more granular, similar to the one below ( i am just putting this up )
> [when][operator]is less than="<"
> [when][operator]is less than or equal to ="<="
> [when][operator]is greater than=">"
> [when][operator]is greater than or equal to =">="
> then, I should be able to state that since age is a int, it can use the above operators.
> A country, being a String, should not be able to use these operators.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list