[jboss-jira] [JBoss JIRA] (DROOLS-4788) newline within the rule cell of spreadsheet is included as a value incorrectly

Hiroko Miura (Jira) issues at jboss.org
Tue Nov 19 22:18:00 EST 2019


     [ https://issues.jboss.org/browse/DROOLS-4788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hiroko Miura updated DROOLS-4788:
---------------------------------
    Workaround Description: 
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


  was:
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




> newline within the rule cell of spreadsheet is included as a value incorrectly
> ------------------------------------------------------------------------------
>
>                 Key: DROOLS-4788
>                 URL: https://issues.jboss.org/browse/DROOLS-4788
>             Project: Drools
>          Issue Type: Bug
>          Components: decision tables
>    Affects Versions: 7.26.0.Final
>         Environment: - spreadsheet
> - 7.26.0.Final and later
>            Reporter: Hiroko Miura
>            Assignee: Mario Fusco
>            Priority: Major
>              Labels: support
>         Attachments: newlineInConditionCellTest.zip
>
>
> When there is new line in rule cell with specific condition, new line('\n') is included as a value.
> Here is generated  problematic DRL.
> {noformat}
> 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
> {noformat}
> This does happen with 7.26.0.Final(RHDM7.5.0), but not with 7.23.0.Final(7.4.x).



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list