[jboss-jira] [JBoss JIRA] Updated: (JBRULES-3111) Regression: constraint comparing nested accessor to true fires when false

Mark Proctor (JIRA) jira-events at lists.jboss.org
Thu Sep 29 03:05:36 EDT 2011


     [ https://issues.jboss.org/browse/JBRULES-3111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Proctor updated JBRULES-3111:
----------------------------------

    Assignee: Edson Tirelli  (was: Mark Proctor)


> Regression: constraint comparing nested accessor to true fires when false  
> ---------------------------------------------------------------------------
>
>                 Key: JBRULES-3111
>                 URL: https://issues.jboss.org/browse/JBRULES-3111
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-compiler (expert)
>    Affects Versions: 5.2.0.Final
>            Reporter: Wolfgang Laun
>            Assignee: Edson Tirelli
>            Priority: Blocker
>             Fix For: FUTURE
>
>
> The .drl file below produces 
>    r3:one false
>    r2:one false
>    r1:one true
> but only r1 is expected to fire.
> Removing all "== true" is one way of showing the correct result.
> declare Bool123
>    bool1 : boolean
>    bool2 : boolean
>    bool3 : boolean
> end
> declare Thing
>    name    : String
>    bool123 : Bool123
> end
> rule kickOff
> when
> then
>     insert( new Thing( "one",   new Bool123( true,  false, false ) ) );
>     insert( new Thing( "two",   new Bool123( false, false, false ) ) );
>     insert( new Thing( "three", new Bool123( false, false, false ) ) );
> end
> rule r1
> when
>     $t: Thing( bool123.bool1 == true )
> then
>     System.out.println( "r1:" + $t.getName() + " " + $t.getBool123().isBool1() );
> end
> rule r2
> when
>     $t: Thing( bool123.bool2 == true )
> then
>     System.out.println( "r2:" + $t.getName() + " " + $t.getBool123().isBool2() );
> end
> rule r3
> when
>     $t: Thing( bool123.bool3 == true )
> then
>     System.out.println( "r3:" + $t.getName() + " " + $t.getBool123().isBool3() );
> end
> ~

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list