[
https://issues.jboss.org/browse/JBRULES-3254?page=com.atlassian.jira.plug...
]
Edson Tirelli commented on JBRULES-3254:
----------------------------------------
Jean-Marc,
Both me and Mario tested this and it is working fine for us in master. Test case I used:
@Test
public void testExpressionConstraints4() {
String drl = "package org.drools\n" +
"rule R1\n" +
" dialect \"mvel\"\n" +
" when\n" +
" Mailbox( owneremail == 'bob@mail' || owneremail
== 'john@mail' )\n" +
" then\n" +
"end\n" +
"rule R2\n" +
" dialect \"mvel\"\n" +
" when\n" +
" Mailbox( ( owneremail == 'bob@mail' ) || (
owneremail == 'john@mail' ) )\n" +
" then\n" +
"end\n";
KnowledgeBase kbase = loadKnowledgeBaseFromString( drl );
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
ksession.insert(new Mailbox("foo@mail"));
int rules = ksession.fireAllRules();
Assert.assertEquals( 0, rules );
ksession.insert(new Mailbox("john@mail"));
rules = ksession.fireAllRules();
Assert.assertEquals( 2, rules );
}
Can you please double check that you got all the proper jars in the classpath?
Thanks
disjunction with string == does not compile anymore
-----------------------------------------------------
Key: JBRULES-3254
URL:
https://issues.jboss.org/browse/JBRULES-3254
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: FUTURE
Reporter: Jean-Marc Vanel
Assignee: Mario Fusco
Such expressions in LHS do not compile anymore :
C( f == "a" || f == "b" )
==> compiler says : Predicate ' f == "a" || f == "b" '
must be a Boolean expression
Note that this does not work any more :
C( ( f == "a" ) || ( f == "b" ) )
--
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