Mauricio Salatino [http://community.jboss.org/people/salaboy21] created the 
discussion

"Re: drools error [ERR 102] Line 40:43 mismatched input '&&' expecting ')' in 
rule "Free Fish Food Sample""

To view the discussion, visit: http://community.jboss.org/message/588790#588790

--------------------------------------------------------------
Hi Mike,
Try with this:
rule "Free Fish Food Sample"
    agenda-group "evaluate"
    dialect "mvel"
    when
        $order : Order()
        not ( $p : Product( name == "Fish Food") && Purchase( product == $p )) 
        not ( $p : Product( name == "Fish Food Sample") && Purchase( product == 
$p ) )        
        exists ( $p : Product( name == "Gold Fish") && Purchase( product == $p 
) )    
        $fishFoodSample : Product( name == "Fish Food Sample" )
    then
        System.out.println( "Adding free Fish Food Sample to cart" );
        purchase = new Purchase($order, $fishFoodSample);
        insert( purchase );
        $order.addItem( purchase );    
end

I've added 1 closing parenthesis ) and I remove the ; in the last condition in 
the when part.
Greetings
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/588790#588790]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to