[rules-users] are for loops possible in drools

ceemh3 martin_henderson at hotmail.com
Sat Jul 31 12:45:50 EDT 2010


Thanks for the response

Since I dont actually need to keep a count of the number of strings that
match the pattern in the list, I have changed your solution to the code
below to make it simpler.
   
rule "Matcher"
  when
 TestClass( $list : listOfStrings )
           String( this matches "^a.b.*$" ) from $list
then
       TestClass.setResponse( "Condition is True !!" );
end

However, when I run this I get the following error because it doesnt
recognize the 'this' keyword

[43,197]: unknown:43:197 Unexpected token 'this'


Do you know what the problem could be ?
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/are-for-loops-possible-in-drools-tp1011729p1011787.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list