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
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.
(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.
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 .
(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. :)
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.