Bug 995085 - Guided Decision Table, enumerations: only the last option is visible
Guided Decision Table, enumerations: only the last option is visible
Status: CLOSED NOTABUG
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity medium
: ER4
: 6.0.0
Assigned To: manstis
Radovan Synek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-08 09:59 EDT by Zuzana Krejčová
Modified: 2016-07-31 21:07 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-22 09:41:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zuzana Krejčová 2013-08-08 09:59:41 EDT
Description of problem:
In 6.0, enumeration support has been added to the Decision Tables. If you use a field that has an enumeration defined on it, you correctly cannot define the optional value list. You get a select box for the default value right away, but this select box is not populated as it should be.

For a Fact with a field and an enumeration defined as 'Fact.field' : 'a=valueA','b=valueB','c=valueC', only the last option, 'valueC' is available.
(The same for enumeration 'Fact.field' : 'valueA','valueB','valueC')

This issue is in Guided Decision Tables and the Wizard for creating them.


Version-Release number of selected component (if applicable):
kie-wb 6.0 CR1
Comment 1 manstis 2013-08-29 14:33:11 EDT
I cannot replicate with (Community) CR2. Can you please confirm the problem of only being able to select the last item in an enumeration for "Default Value" remains? If you can replicate the problem please provide steps how to reproduce fully. Thanks.
Comment 2 Zuzana Krejčová 2013-08-30 04:18:47 EDT
(In reply to manstis from comment #1)
> I cannot replicate with (Community) CR2. Can you please confirm the problem
> of only being able to select the last item in an enumeration for "Default
> Value" remains? If you can replicate the problem please provide steps how to
> reproduce fully. Thanks.

I tried this with the community CR2 and with the product ER2. In both version I see this bug.

Step to take:
1. Create a new project.
2. In this project, create a new fact through the Data Modeler - public class Fact... private java.lang.String field;...
3. Save the model. Optionally refresh the browser to be able to see the new file.
4. Create a new Enumeration - source should show this: 'Fact.field' : 'a','b','c' - save again.
5. Create a new Guided Decision Table (no wizard this time) and add a new condition column.
6. Set the Pattern to 'Fact', choose a binding. Set the field to 'field' and operator to 'equal to'. Fill in some header.
7. Click the Default value select box.

You will see options 'Choose...'  and 'c' only. If you add that column, you won't be able to select any other option than 'c' in the table itself either.
Comment 3 manstis 2013-08-30 06:25:39 EDT
You're enumeration definition is wrong.

If you define it as 'Fact.field' : ['a','b','c'] the "Default Value" drop-down works correctly. Defining it as you have 'Fact.field' : 'a','b','c' doesn't create an array for possible values.

The syntax for enumerations is covered in the User Guide .
Comment 4 Zuzana Krejčová 2013-08-30 06:47:50 EDT
(In reply to manstis from comment #3)
> You're enumeration definition is wrong.
> 
> If you define it as 'Fact.field' : ['a','b','c'] the "Default Value"
> drop-down works correctly. Defining it as you have 'Fact.field' :
> 'a','b','c' doesn't create an array for possible values.
> 
> The syntax for enumerations is covered in the User Guide .

Oh yeah, sorry for that - I foolishly trusted the validation in there and forgot this little bit. Expect another BZ about validation then. :)
Comment 5 manstis 2013-08-30 06:49:06 EDT
hehe, no problem - although (1) I'd recommend the new BZ asks for more general improvement to the Enumeration Editor, (2) it isn't a blocker.

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