Bug 995085 - Guided Decision Table, enumerations: only the last option is visible
Summary: Guided Decision Table, enumerations: only the last option is visible
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER4
: 6.0.0
Assignee: manstis
QA Contact: Radovan Synek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-08 13:59 UTC by Zuzana Krejčová
Modified: 2016-08-01 01:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-22 13:41:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 795815 0 unspecified MODIFIED Missing support for enumerations in Decision Table Wizard 2023-05-01 08:28:00 UTC
Red Hat Bugzilla 1048950 0 medium CLOSED Invalid enumeration not detected 2021-02-22 00:41:40 UTC

Internal Links: 795815 1048950

Description Zuzana Krejčová 2013-08-08 13:59:41 UTC
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 18:33:11 UTC
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 08:18:47 UTC
(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 10:25:39 UTC
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 10:47:50 UTC
(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 10:49:06 UTC
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.