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

DrlDumper does not generate the accumulate import

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Done
    • 7.44.0.Final, 7.46.0.Final
    • None
    • core engine
    • 2020 Week 49-51 (from Nov 30)
    • Hide

      run attached reproducer (mvn clean test).

      Show
      run attached reproducer (mvn clean test).
    • NEW
    • NEW
    • ---
    • ---

    Description

      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);
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: