[jboss-jira] [JBoss JIRA] Closed: (JBRULES-1083) Brackets are not always optional for non-existential quantifier "not"
Michael Neale (JIRA)
jira-events at lists.jboss.org
Tue Aug 21 23:51:18 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-1083?page=all ]
Michael Neale closed JBRULES-1083.
----------------------------------
Resolution: Done
Documentation updated (including railroad) to reflect this. The brackets can only ever be optional for a single pattern.
> Brackets are not always optional for non-existential quantifier "not"
> ----------------------------------------------------------------------
>
> Key: JBRULES-1083
> URL: http://jira.jboss.com/jira/browse/JBRULES-1083
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Drl Parser/Builder
> Affects Versions: 4.0.0.GA
> Reporter: Markus Reitz
> Assigned To: Michael Neale
> Priority: Minor
> Fix For: 4.0.1
>
>
> According to the documentation, brackets are optional as illustrated by
> Example 6.37. No Busses
> not Bus()
> In case of the rule (class SpecialString in http://jira.jboss.com/jira/browse/JBRULES-1079)
> package test
> rule "Brackets"
> when
> not exists(x : SpecialString() and
> forall(y : SpecialString(this!=x)
> SpecialString(this==y, text=="Universe")))
> then
> System.out.println("Condition satisfied");
> end
> this is not true. Trying to load this rule leads to
> org.drools.rule.InvalidRulePackage: [8,8]: unknown:8:8 Unexpected token 'exists'
> at org.drools.rule.Package.checkValidity(Package.java:408)
> at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:288)
> at DroolsTest.<init>(Unknown Source)
> at DroolsTest.main(Unknown Source)
> When brackets are added:
> package test
> rule "Brackets"
> when
> not(exists(x : SpecialString() and
> forall(y : SpecialString(this!=x)
> SpecialString(this==y, text=="Universe"))))
> then
> System.out.println("Condition satisfied");
> end
> rule loading works without any exceptions.
--
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