[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1455) Or / And used with DSL language

M H (JIRA) jira-events at lists.jboss.org
Sat Feb 9 11:50:19 EST 2008


    [ http://jira.jboss.com/jira/browse/JBRULES-1455?page=comments#action_12399008 ] 
            
M H commented on JBRULES-1455:
------------------------------

Sorry for the inconvience but the second workaround of course works just with a little modification in DefaultExpander.java

Line 237

if ( lines[i].equals( expanded[lastExpanded] ) && !(lines[i].trim().equals("(") || lines[i].trim().equals(")"))) {
     // report error
     this.addError( new ExpanderException( "Unable to expand: " + lines[i].replaceAll( "[\n\r]", "" ).trim(), i + lineOffset ) );
}


> Or / And used with DSL language
> -------------------------------
>
>                 Key: JBRULES-1455
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1455
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Drl Parser/Builder
>    Affects Versions: 4.0.4
>            Reporter: M H
>             Fix For: 4.0.5
>
>
> DSL:
> [condition][]is a Person=Person()
> [condition][]- female=sex == "f"
> [condition][]- male=sex == "f"
> [condition][]- age {value}=age=={value}
> DSLR:
> rule
>    when
>         ($person: is a Person
>               - male
>               - age 60
>         or
>         $person: is a Person
>               - female
>               - age 70)
>    then
> end
> resolves to:
>                                |
>                               \/
> .... ($person: Person( , sex="m", age == 60)
>     or
>      $person: Person(sex="f", age == 70))

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

        



More information about the jboss-jira mailing list