[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1607) or with pattern binding doesn't work

Jaroslaw Kijanowski (JIRA) jira-events at lists.jboss.org
Wed Jun 18 03:07:37 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBRULES-1607?page=comments#action_12417700 ] 
            
Jaroslaw Kijanowski commented on JBRULES-1607:
----------------------------------------------

This is also present in trunk (rev. 20565)

This rule

rule "a"
when
t:(or TestFact() TestFact() )
then
end

fails:

org.drools.rule.InvalidRulePackage: [9,3]: unknown:9:3 mismatched token: [@25,74:75='or',<38>,9:3]; expecting type ID[9,17]: unknown:9:17 mismatched token: [@31,88:95='TestFact',<7>,9:17]; expecting type RIGHT_PAREN[9,28]: unknown:9:28 mismatched token: [@35,99:99=')',<12>,9:28]; expecting type THEN
	at org.drools.rule.Package.checkValidity(Package.java:543)
	at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:416)
	at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:375)

> or with pattern binding doesn't work
> ------------------------------------
>
>                 Key: JBRULES-1607
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1607
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Drl Parser/Builder
>    Affects Versions: 4.0.7, 5.0.0-M1
>            Reporter: Jaroslaw Kijanowski
>         Assigned To: Mark Proctor
>
> When I use
> when
> (or 
>   p:Person( sex == "M", age > 60 )  
>   p:Person( sex == "F", age > 65 )
> ) 
> then
> end
> it works fine, but when I use
> when
> p:(or 
>   Person( sex == "M", age > 60 )  
>   Person( sex == "F", age > 65 )
> )
> it fails, however this should be allowed (at least it's in the docs, example 6.36).

-- 
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