I'm using JBoss Drools 5.5.0 rules.
I have an ArrayList<ElementDetail>
, and Map<String, ElementDetail>
, and I need to do print out all the ElementDetail in ArrayList but not in Map.
class ElementDetail {
private String name;
...
}
ElementDetail class has a name variable which is identified as the Map key.
So far this is what I tried, but it gives no matches:
...
when
eleList : List()
$eleDetail : ElementDetail() from eleList
$map: Map(myMap.keySet contains $eleDetail.getName())
...
I was able to find similar posts for matching elements in a collection, but it does not get the unmatched elements for a map: