[jboss-jira] [JBoss JIRA] (JBRULES-3336) Could not parse knowledge when using 'not contains' in a parentheses leading a '!'
Miles Wen (Updated) (JIRA)
jira-events at lists.jboss.org
Fri Jan 6 04:55:09 EST 2012
[ https://issues.jboss.org/browse/JBRULES-3336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Miles Wen updated JBRULES-3336:
-------------------------------
Description:
This code could not be parsed correctly:
rule "out"
when
Msg(!(set not contains "test"))
then
end
I tried a few simple situations and found that when using 'not contains' operator in a '\!' leading parentheses triggers this problem. If no '\!' prefixing the parentheses,the program works like a charm...
The example above seemed so stupid(you can use a 'contains' operator instead), but this is the simplest toy example.And this problem would be looked more important if you want to write some logic like this:
Msg(!(set not contains "test" || !bool && string == "hello"))
was:
This code could not be parsed correctly:
rule "out"
when
Msg(!(set not contains "test"))
then
end
I tried a few simple situations and found that when using 'not contains' operator in a \'!\' leading parentheses triggers this problem. If no \'!\' prefixing the parentheses,the program works like a charm...
The example above seemed so stupid(you can use a 'contains' operator instead), but this is the simplest toy example.And this problem would be looked more important if you want to write some logic like this:
Msg(!(set not contains "test" || !bool && string == "hello"))
Forum Reference: http://drools.46999.n3.nabble.com/rules-users-Could-not-parse-knowledge-when-using-not-contains-in-a-quote-leading-a-tt3631338.html (was: http://drools.46999.n3.nabble.com/rules-users-Could-not-parse-knowledge-when-using-not-contains-in-a-quote-leading-a-tt3631338.html)
> Could not parse knowledge when using 'not contains' in a parentheses leading a '!'
> ----------------------------------------------------------------------------------
>
> Key: JBRULES-3336
> URL: https://issues.jboss.org/browse/JBRULES-3336
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-compiler (expert)
> Affects Versions: 5.3.0.Final
> Environment: jdk 1.6u27 drools 5.3.0 final
> Reporter: Miles Wen
> Assignee: Mark Proctor
> Labels: notcontains, parentheses
>
> This code could not be parsed correctly:
> rule "out"
> when
> Msg(!(set not contains "test"))
> then
> end
> I tried a few simple situations and found that when using 'not contains' operator in a '\!' leading parentheses triggers this problem. If no '\!' prefixing the parentheses,the program works like a charm...
> The example above seemed so stupid(you can use a 'contains' operator instead), but this is the simplest toy example.And this problem would be looked more important if you want to write some logic like this:
> Msg(!(set not contains "test" || !bool && string == "hello"))
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list