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

NPE in executable model using an existental pattern in an accumulate and binding the accumulated value with a from

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • 2020 Week 37-39 (from Sep 7)
    • NEW
    • NEW

      Using an existental pattern in an accumulate and binding the accumulated value with a from like in the following LHS

      accumulate ( $p: Person ( getName().startsWith(\"M\") ) and exists(String());
        $sum : sum($p.getAge())
      )
       $s: String() from $sum.toString()  

      causes this NPE in the executable model

      java.lang.NullPointerException
      	at org.drools.core.rule.LogicTransformer.processElement(LogicTransformer.java:193)
      	at org.drools.core.rule.LogicTransformer.processElement(LogicTransformer.java:168)
      	at org.drools.core.rule.LogicTransformer.processElement(LogicTransformer.java:250)
      	at org.drools.core.rule.LogicTransformer.fixClonedDeclarations(LogicTransformer.java:153)
      	at org.drools.core.rule.LogicTransformer.transform(LogicTransformer.java:96)
      	at org.drools.core.definitions.rule.impl.RuleImpl.getTransformedLhs(RuleImpl.java:601)
      	at org.drools.core.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:115)
      	at org.drools.core.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:110)

              mfusco@redhat.com Mario Fusco
              mfusco@redhat.com Mario Fusco
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: