Hi,

There is a situation where BigDecimal is returned from a function.  But when
this BigDecimal is included as one of the conditions in a rule.  I get a
ClassCastException about trying to cast to Integer.  Below is an example that
reproduces this error.  Is this an expected behavior?  If so, is there any way
to avoid the error?



package com.sample

import java.math.BigDecimal


rule "init1"
salience 1000
        when
          num : BigDecimal() from getBigDecimal("1")
        then
          System.out.println(num.compareTo(new BigDecimal("0")));
end


function BigDecimal getBigDecimal(String value) {
  return new BigDecimal(value);
}



_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to