[jboss-jira] [JBoss JIRA] (DROOLS-26) Two if/else in a row on the same Pattern generate a compilation error

Mario Fusco (JIRA) jira-events at lists.jboss.org
Mon Feb 4 09:00:53 EST 2013


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

Mario Fusco resolved DROOLS-26.
-------------------------------

    Fix Version/s: 5.6
                   6.0.0.Alpha1
       Resolution: Done

    
> Two if/else in a row on the same Pattern generate a compilation error
> ---------------------------------------------------------------------
>
>                 Key: DROOLS-26
>                 URL: https://issues.jboss.org/browse/DROOLS-26
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Mario Fusco
>            Assignee: Mario Fusco
>             Fix For: 5.6, 6.0.0.Alpha1
>
>
> Two if/else in a rowon the same Pattern (as in the following example)  generate a compilation error
> {code}
> rule "Car" when
>   $car: Car( abs == true )
>   if ( colour == \"red\" ) do[red]
>   else if ( colour != \"red\" ) do[notRed]
>   if ( price < 1000 ) do[cheap]
>   else do[notCheap]
>  UnBlocker()
> then
>   System.out.println( "The best Car is in " + $car ); 
> then[red]
>   System.out.println( ">>> Car is red " + $car ); 
>   insert( new UnBlocker() ); 
> then[notRed]
>   System.out.println( ">>> Car is NOT red " + $car ); 
> then[cheap]
>   System.out.println( "*** Car is cheap " + $car ); 
> then[notCheap]
>   System.out.println( "*** Car is NOT cheap " + $car ); 
> end";
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list