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

DRLDumper corrupts accumulate over conjunction of patterns

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 7.42.0.Final
    • core engine
    • None
    • 2020 Week 34-36 (from Aug 17)
    • Hide

      Run

      mvn clean test

      on attached reproducer

      Show
      Run mvn clean test on attached reproducer
    • NEW
    • NEW

    Description

      The following valid accumulate clause:

      Set(size>=1) from accumulate(
       $p1:Pattern1(...)
       and
       $p2:Pattern2(...)
       , collectSet($p1)
       )

      is modified as follows when parsed and re-serialized with DRLParser/DRLDumper:

      Set(size>=1) from accumulate(
       ($p1:Pattern1(...)
       and
       $p2:Pattern2(...))
       , collectSet($p1)
       )

      The latter syntax is rejected by the Drools compiler with the following error:

      Error Messages:
       Message [id=1, kieBase=defaultKieBase, level=ERROR, path=org/example/rules.drl, line=14, column=0
       text=Invalid accumulate pattern in rule 'round trips accumulate'.]

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            mcasalino Matteo Casalino (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: