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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.6.0.GA
    • 7.5.0.GA
    • BRE
      • spreadsheet
      • RHDM7.5.0
    • Release Notes
    • CR1
    • +
    • 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
    • Hide

      run attached reproducer by 'mvn clean test'

      Show
      run attached reproducer by 'mvn clean test'
    • 2019 Week 47-49 (from Nov 18)

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

            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:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: