]
Luca Molteni reassigned DROOLS-5536:
------------------------------------
Assignee: Luca Molteni (was: Mario Fusco)
Not pattern dereferencing a variable in a constraint is wrongly
evaluated using the executable model
----------------------------------------------------------------------------------------------------
Key: DROOLS-5536
URL:
https://issues.redhat.com/browse/DROOLS-5536
Project: Drools
Issue Type: Bug
Reporter: Mario Fusco
Assignee: Luca Molteni
Priority: Major
Reproducer
{code:java}
@Test
public void testNotWithDereferencingConstraint() {
final String drl1 =
"package org.drools.compiler\n" +
"import " + Person.class.getCanonicalName() + ";\n" +
"rule R when\n" +
" $p: Person( $name : name )\n" +
" not Person( name.length == $name.length )\n" +
"then\n" +
"end\n";
KieSession ksession = getKieSession( drl1 );
ksession.insert( new Person("test", 18) );
assertEquals( 0, ksession.fireAllRules() );
} {code}