Drools rule to filter element with a numeric property below a percentage of the total
- by Mario
Hello,
I have just started using Drools on a small project and now I need to write a rule a bit complex and I don't really know what's the best way to do it.
I am applying this rule to a list of objects of the same type (this class have a property called numberOfExecutions). I need to check for each element of the list if the numberOfExecutions of that element is bigger than 5% of the total numberOfExecutions (the sum of numberOfExecutions of all the elements in the list).
I could not think of a nice way to implement this in drools so far, do you have a suggestion?