Re: [rules-users] String length check
I'd also use the int 8 instead of the String 8 :) -- View this message in context: http://drools.46999.n3.nabble.com/String-length-check-tp3502269p3505833.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] String length check
@Davide, I'm using the guided editor and I am putting the value as 8 But the generated source shows 8. Not sure of this is a defect in Drools or something that I'm doing incorrectly. -- View this message in context: http://drools.46999.n3.nabble.com/String-length-check-tp3502269p3506079.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] String length check
Guvnor used to escape all literals with quotation marks before 5.2. There have been numerous fixes to the BRL Guided Editor for 5.2 onwards. I would definitely recommend an upgrade. Can you please advise if you used an expression for your nested accessor or sub-field constraints? Thanks, Mike On 14 November 2011 06:46, lansyj lans...@gmail.com wrote: @Davide, I'm using the guided editor and I am putting the value as 8 But the generated source shows 8. Not sure of this is a defect in Drools or something that I'm doing incorrectly. -- View this message in context: http://drools.46999.n3.nabble.com/String-length-check-tp3502269p3506079.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] String length check
I can't try in mvel/drools right now, but String has length(), not size. On Sat, Nov 12, 2011 at 1:29 PM, lansyj lans...@gmail.com wrote: 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. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users