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

newline within the rule cell of spreadsheet is included as a value incorrectly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 7.26.0.Final
    • decision tables
    • 2019 Week 47-49 (from Nov 18)
    • Hide

      run attached reproducer by 'mvn clean test'

      Show
      run attached reproducer by 'mvn clean test'
    • Compatibility/Configuration
    • Hide

      If double quotes is set in rule cell instead of template like the following, this can be avoided.

      • template (BAD)
        map["$1"] $2,
        map["$3"],$4
      • rule cell (BAD)
        Key1, == var1,
        Key2, == var2
      • template (GOOD)
        map[$1] $2,
        map[$3],$4
      • rule cell (GOOD)
        "Key1", == var1,
        "Key2", == var2
      Show
      If double quotes is set in rule cell instead of template like the following, this can be avoided. template (BAD) map ["$1"] $2, map ["$3"] ,$4 rule cell (BAD) Key1, == var1, Key2, == var2 template (GOOD) map [$1] $2, map [$3] ,$4 rule cell (GOOD) "Key1", == var1, "Key2", == var2
    • NEW
    • NEW

    Description

      When there is new line in rule cell with specific condition, new line('\n') is included as a value.

      Here is generated problematic DRL.

      rule "newlineInCell_11"
      when
      m:Message(map["Key1"]  == var1,
      map["\nKey2"]  == var2)                     <== HERE                   
      then
      System.out.println(m.getMessage());
      m.setMessage("Goodbye cruel world");
      m.setStatus(Message.GOODBYE);
      end
      

      This does happen with 7.26.0.Final(RHDM7.5.0), but not with 7.23.0.Final(7.4.x).

      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: