[rules-users] String length check

lansyj lansyjp at gmail.com
Sat Nov 12 07:29:40 EST 2011


Hi folks,

I'm trying to create a guided rule which treats customers differently based
on the length of their customer ID. The generated rule source is as follows:

rule "OP Customer"
    dialect "mvel"
    when
        $bean : ProgramMemberBean( profileVO.memberID.size() == "8" )
    then
        $bean.setSegmentCode( "OP_CUSTOMER" );
        update( $bean );
end

Everything seems good to me, but I get the following error upon validation:

[OP Customer] [ERR 101] Line 4:53 no viable alternative at input ')' in rule
"OP Customer" in pattern ProgramMemberBean
[OP Customer] [ERR 102] Line 4:55 mismatched input '==' expecting ')' in
rule "OP Customer" in pattern ProgramMemberBean

Any help is very much appreciated.

Best Regards

-lj

--
View this message in context: http://drools.46999.n3.nabble.com/String-length-check-tp3502269p3502269.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list