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

Guided Rule Editor: formula content is not reloaded correctly

    XMLWordPrintable

Details

    • 1
    • False
    • False
    • CR1
    • +
    • Undefined
    • Hide
      1. install PAM 7.9.1 on top of EAP 7.3.5
      2. create a new project in "decision-central" and add a data model with List<String> typed member field
      3. create a "Guided Rule" and select the data model in condition, add the condition for the List<String> field, "contains" with formula: String.join("-", "abc", "xyz")
      4. save the rule, use top-right side "X" button to close editor
      5. in project view, select the same rule and open it
      Show
      install PAM 7.9.1 on top of EAP 7.3.5 create a new project in "decision-central" and add a data model with List<String> typed member field create a "Guided Rule" and select the data model in condition, add the condition for the List<String> field, "contains" with formula: String.join("-", "abc", "xyz") save the rule, use top-right side "X" button to close editor in project view, select the same rule and open it
    • 2021 Week 13-15 (from Mar 29), 2021 Week 19-21 (from May 10), 2021 Week 22-24 (from May 31), 2021 Week 25-27 (from Jun 21)

    Description

      When using "Formula" in Guided Rule editor and saving, there is no error reported, however, after closing the editor window and opening it again, the formula is getting truncated and becomes literal strings.

      See attachment "original-rule.png" for screenshot of the original rule.
      The screenshot "reloaded-rule.png" shows the same content being reloaded in the editor.

      The "Source" of the original rule:
      ----------------------------------------

      rule "rule-02862036"
      	dialect "mvel"
      	when
      		CustomerProfile( name == "9008" , listValue contains ( String.join("-", "abc", "xyz") ) )
      	then
      

      ----------------------------------------

      The "Source" when the same rule is reloaded:
      ----------------------------------------

      rule "rule-02862036"
      	dialect "mvel"
      	when
      		CustomerProfile( name == "9008" , listValue contains "String.join("-", abc" )
      	then
      

      ----------------------------------------

      It is expected the same rule works also for formulas
      ----------------------------------------

      rule "rule-02862036"
      	dialect "mvel"
      	when
      		CustomerProfile( name == "9008" , listValue contains "String.join("-", $variableOne, $variableTwo )
      	then
      

      Attachments

        Issue Links

          Activity

            People

              trikkola Toni Rikkola
              rhn-support-lywang Lyle Wang (Inactive)
              Jozef Marko Jozef Marko
              Jozef Marko Jozef Marko
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: