Here is the code to iterate over the collection of interests inside the Person object and check if one of them contains the field of interests Name: "Running":
rule "likes running?" when $p : Person() $inter : Interest ( interestName == "Running" ) from $p.interests then System.out.println("I like running too."); end
Valera
source share