Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-7218

When String is passed to add method of List<BigDecimal>, exec-model fails while non-exec-model allows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 7.73.0.Final, 8.29.0.Final
    • None
    • 2022 Week 41-43 (from Oct 10)
    • 1
    • NEW
    • NEW
    • ---
    • ---

      With a rule like this

      rule "rule_add_list"
          no-loop true
        when
              $fact : Fact( str == "ADD", $val : "100")
        then
              modify($fact) {
                      bdList.add($val);
              }
      end
      

      exec-model throws an error

      The method add(BigDecimal) in the type List<BigDecimal> is not applicable for the arguments (String)
      

      But non-exec-model doesn't throw an error. It allows to add String in List<BigDecimal>.

      Which is correct?
       

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: