Bug 742149 - Enumerations in rules not showing
Summary: Enumerations in rules not showing
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor)
Version: BRMS 5.2.0-ER1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: manstis
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-29 09:12 UTC by Zuzana Krejčová
Modified: 2023-05-01 08:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
after step 4 (95.34 KB, image/png)
2011-09-29 09:12 UTC, Zuzana Krejčová
no flags Details
after step 4 and clicking Add more options... (86.03 KB, image/png)
2011-09-29 09:13 UTC, Zuzana Krejčová
no flags Details
POJO model (8.35 KB, application/x-java-archive)
2011-09-29 09:20 UTC, Zuzana Krejčová
no flags Details
screen shot showing issue of nested fact type enumerations. (38.52 KB, image/png)
2011-09-29 21:27 UTC, manstis
no flags Details

Description Zuzana Krejčová 2011-09-29 09:12:28 UTC
Created attachment 525491 [details]
after step 4

Description of problem:
Enumerations are not working in Business Rules.


Version-Release number of selected component (if applicable):
Private QA build, post ER4, should have all the changes CR1 should have


How reproducible:


Steps to Reproduce:
I have a POJO model with fact Person with fields age, name & sex.
1. Create an Enumeration:
   'Person.sex':['f=female', 'm=male']
   Save it.
2. Create a rule, 
3. add a condition: Person ... then click the row and add a restriction on field sex. Choose "equal to" operator.
4. Click the pencil to add a value, choose Literal value.

  
Actual results:
No field or drop down box for choosing a value is visible. Value cannot be added.


Expected results:
It should be possible to choose a literal value from a drop down box.




Furthermore - if I then click the "Add more options to this field values", the whole condition disappears along with the "THEN" section and nothing can be added to the rule.

Comment 1 Zuzana Krejčová 2011-09-29 09:13:32 UTC
Created attachment 525492 [details]
after step 4 and clicking Add more options...

Comment 2 Zuzana Krejčová 2011-09-29 09:20:05 UTC
Created attachment 525493 [details]
POJO model

Comment 3 manstis 2011-09-29 21:25:58 UTC
The reported problem has been fixed and pushed to 5.2.x branch however an unreported problem remains: using enumerations on nested models (e.g. ParentType.ChildType.enumField == XYZ). I have attached a screen shot that hopefully explains it better than lots of words. The problem is caused by enumerations being driven by the parent Fact type (which in part is to support linked enums, where the value of one depends on another). It is not a simple fix. My recommendation would be to have this BZ issue in 5.2 and perhaps raise another to fix the other problem I report for 5.3 (there is a work-around and it is *possibly* an edge case).

Comment 4 manstis 2011-09-29 21:27:08 UTC
Created attachment 525648 [details]
screen shot showing issue of nested fact type enumerations.

Comment 5 Zuzana Krejčová 2011-09-30 13:15:07 UTC
Works well, thanks. Will look at the issue you mentioned and create a new BZ.

Comment 6 manstis 2011-09-30 13:17:31 UTC
Great :) I just noticed that the screen shot misses one case: using an expression with a non-nested enumeration works as well - the problem is just when you have a nested field enumeration.


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