I want to check if a collection contains not three elements. In java I would do
!(collection.contains("s1") && collection.contains("s2") && collection.contains("s3"))
How can I do this with drools? I searched for two hours and tried anything but can't find a solution for this "simple" problem. I found the "Compound Value Restriction" which is what I exactly need, but it does not work for collections and the "contains" operator.
I would appreciate your answers.
Nathanael
This does what the Java code does:
Collection( this not contains "s1" ||
this not contains "s2" ||
this not contains "s3")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With