[jboss-jira] [JBoss JIRA] (DROOLS-5536) Not pattern dereferencing a variable in a constraint is wrongly evaluated using the executable model

Mario Fusco (Jira) issues at jboss.org
Tue Jul 28 03:09:00 EDT 2020


Mario Fusco created DROOLS-5536:
-----------------------------------

             Summary: 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: Mario Fusco


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}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list