Not sure of what you exactly ...
If you want to combine tests, you can write this :
Rule
“test filter”
When
$cm:
ConditionMatrix()
$document:
ArrayList() from collect ( Document (user.isPrivateName ==
$cm.isPrivateName, Payment.isLegal == $cm.isLegal) )
Then
//do
something
End
If you want to make the filter more dynamic and write only one
"collect" rule, I don't see any out-of-the-box method.
You can add a method in ConditionMatrix that accepts a Document and
write this rule :
Rule “test filter”
When
$cm:
ConditionMatrix()
$document:
ArrayList() from collect ( Document (eval($cm.accept(this)) ) )
Then
//do
something
End
Of course you have to implement the "accept" method in Java (and you
can then do several sub-classes for you filters)