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

Allow both prefixed and infixed AND in nested accumulates

    Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core engine
    • Labels:
      None
    • Sprint:
      2019 Week 02-04
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      At the moment drools can compile composite condition in a nested accumulate only using a prefixed 'and' like in

          String($l: length)
          accumulate(
              (and
                  Integer(this == $l) 
                  accumulate(
                      Long() 
                      ;$counter: count(1);$counter <= 4)
               )
              ;$mainCounter: count(1);$mCounter <= 2
          )
      

      while it fails when using the infixed notation like in:

          String($l: length)
          accumulate(
              (
                  Integer(this == $l)  and
                  accumulate(
                      Long() 
                      ;$counter: count(1);$counter <= 4)
               )
              ;$mainCounter: count(1);$mCounter <= 2
          )
      

      It is required that this could work also with the infix AND also because this is notation used by the DRLDumper when regenerating the drl from a PackageDescr

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mfusco Mario Fusco
                  Reporter:
                  mfusco Mario Fusco
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: