I've searched around the internet but could not find an solution for a problem we are currently facing with drools (6.2.0).
Suppose i have a rule like this:
when
$list: ProductList()
$product: Product() from $list
$product2: Product(this != product) from $list
then
// do something
end
if $list contains 2 products, A and B, this rule will fire for combinations:
- A-B
- B-A
For some reason I am not able to make the rule fire only once (either ONLY A-B or ONLY B-A)
Does anybody know if there is a standard way to achieve the desired result?
Many Thanks in advance!
Regards,
Kim
You need to have a Product attribute that is comparable and unique. I'm assuming a product number: