Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1516

DrlDumper does not generate the accumulate import

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.10.0.GA
    • 7.9.0.GA
    • BRE
    • False
    • False
    • Release Notes
    • CR1
    • +
    • Undefined
    • Hide

      run attached reproducer (mvn clean test).

      Show
      run attached reproducer (mvn clean test).
    • 2020 Week 49-51 (from Nov 30)

      DrlDumper is not printing out the accumulate import.

      Here is an example code of PackageDescrBuilder.

              PackageDescr packageDescr = DescrFactory.newPackage().name("examples.drools")
                      .newImport().target("java.math.BigDecimal").end()
                      .newAccumulateImport().target("examples.drools.accumulate.OriginalFunction").functionName("originalFunction").end()
                      .newRule().name("Test Rule")
                          .lhs()
                              .accumulate()
                                  .source().pattern().type("TargetFact").id("$target", false)
                                  .end()
                              .end()
                          .function("originalFunction", "$accumulateResult", false, "$target.hoge")
                          .constraint("true")
                          .end()
                      .end()
                      .rhs("System.out.println($accumulateResult);")
                      .end()
                  .end().getDescr();
      
              String drl = new DrlDumper().dump(packageDescr);
      

              mfusco@redhat.com Mario Fusco
              rhn-support-hmiura Hiroko Miura
              Daniel Rosa Daniel Rosa
              Daniel Rosa Daniel Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: