[rules-users] Pattern matching rules

rganesh84 ganesh_r04 at infosys.com
Wed Jul 24 05:47:20 EDT 2013


I was just wondering if there is a pattern matcher available in drools.
Below is a sample

rule "Action Movies"
	dialect "java"
    when
        ui : UserInfo(likes contains "Action")        
    then
    	List sw = new ArrayList();
		sw.add("Die Hard");
		sw.add("The Avengers");
      	ui.setRecs(sw);
end

the rule strictly checks for word "Action" but if the likes list contains
"Action Movies" the rule won't get processed. Is there a pattern matching
ability or a like search for a String/list containing strings?




--
View this message in context: http://drools.46999.n3.nabble.com/Pattern-matching-rules-tp4025112.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list