I'm trying to collect into a non-list type as there may be duplicates which I'd like to filter out using the Set semantics. The documentation states:
The result pattern of the collect element can be any concrete class that implements the java.util.Collection interface and provides a default no-arg public constructor. You can use Java collections like List, LinkedList, and HashSet, or your own class.
So in my rules I'm using a HashSet:
$alarms: HashSet() from collect(Alarm(status == "pending"))
In the then clause of the rule I'm calling a Java helper method which expects a java.util.Set but compilation fails because my helper method does not accept java.util.List as parameter type.
A reproducer can be found here: https://github.com/comlinegmbh/kogito-collect-error-poc