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.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users