Re: [rules-users] BigDecimal comparison

2012-06-10 Thread Vincent LEGENDRE
Done a little test using 3 approachs (with new BigDecimal(-12.321)), all are working: rule "test big decimal 1" when Pojo(bigDecimal < 0.0) then System.out.println("test big decimal 1"); end rule "test big decimal 2" when Pojo(bigDecimal.doubleValue < 0.0) then S

[rules-users] BigDecimal comparison

2012-06-10 Thread devan.vanree...@gmail.com
Hi there, Please assist. I have an object MaxCap that has a single property capAmount of type BigDecimal. The BigDecimal is negative when the rule is MaxCap( capAmount.doubleValue < 0.00 ) it doesnt fire, which I expect it should but when the rule is MaxCap( capAmount.doubleValue > 0.00 ) t

Re: [rules-users] get new errors caused by KnowledgeBuilder.add()

2012-06-10 Thread Wolfgang Laun
I'd just instanceof test the Collection against List and cast. Second, consider an issue requiring support for error checking with this additive kind of build. If all of your rules are in the same package, consider concatenating the rules strings in a string builder and feed the results to the KB

Re: [rules-users] get new errors caused by KnowledgeBuilder.add()

2012-06-10 Thread Sandeep Bandela
yeah the internal impl is arraylist but the interface is a collection, so everytime I had to convert it to array and keep counter of last-error-index and fetch new KnowledgeBuilderErrors on the collection, or use iterator to iterate the last-error-index and continue till the end of the collection.