Bug 1325449 - Guided Decision Tables: Construction of DRL for "otherwise" values includes empty String
Summary: Guided Decision Tables: Construction of DRL for "otherwise" values includes e...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: ---
Assignee: manstis
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-08 20:44 UTC by manstis
Modified: 2020-03-27 19:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:42:45 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker GUVNOR-2477 0 None None None Never

Description manstis 2016-04-08 20:44:14 UTC
Description of problem:

Columns with "otherwise" cells generate DRL including the "otherwise" cell; manifesting itself as an empty String in the DRL. For example 'Person( name not in ( "Mike", "Mark", "" ) )'. This is caused by marshalling of the Decision Table model from client to server where the default constructor for DTCellValue52 sets the cell's value to an empty String.

Version-Release number of selected component (if applicable):

6.4.0.Final (Community); 6.3.x (Product)

How reproducible:

Steps to Reproduce:
1. Create a Guided Decision Table
2. Add a Condition column for a String field
3. Set operator to "=="
4. Add at least 2 rows
5. Set the cell of the column, row 1 to "a"
6. Set the cell of the column, row 2 to <otherwise>
7. View source

Actual results:

DRL like 'Person( name not in ("a", "") )' is generated.

The empty String is erroneous.

Expected results:

DRL like 'Person( name not in ("a") )' is generated.

Comment 2 Edson Tirelli 2016-04-08 21:30:40 UTC
Rajesh, this is fixed in master. Not sure if we should include this in CR1 or in 6.3.1 patch. I asked Michael for additional clarification.

Comment 3 manstis 2016-04-08 21:36:41 UTC
Edson, Rajesh, it's an edge case, specific to when Users try to use "otherwise" (e.g. Person.age==20 || 30 || 40; and then another rule for when Person.age is anything else). The fix was however trival, low risk and has test coverage.

Comment 4 Sándor Irlanda 2016-08-23 14:24:16 UTC
I confirming this error, but extend it also:
In the demo application i changed the Pricing loans.gdst through kie workbench by adding an extra row of "0, 9999, <otherwise>, 2000, <otherwise>, false, 0, 1".

With this row I get a validation error:
[ERR 101] Line 31:93 no viable alternative at input ')' in rule "Row 3 Pricing loans"

And the problem is the superfluous comma in "lengthYears not in ( 30, 20,  )" expression.

Comment 5 Jiri Locker 2016-08-24 09:15:37 UTC
Sandor, BRMS issue tracking has been migrated to JIRA. Please add this comment to https://issues.jboss.org/browse/RHBRMS-574 or file a new issue.


Note You need to log in before you can comment on or make changes to this bug.