Drools - check if exists/contains string in a List<String>
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need to create a rule to check if a part of string exists inside a List[String]. Is there a way that i could do it? I'm trying using contains but it's not working. rule "New Assistance" when $room:Room($tags : tags) //$room:Room(tags contains "protocol") $value:String() from $tags //Boolean(booleanValue == true) from $value == "protocol" Boolean(booleanValue == true) from $value.contains("protocol") then System.out.println("Error"); end And here is my code ... val room = new Room(null, List[User](), List[Message](message), new Date, null,