Bug 742149 - Enumerations in rules not showing
Enumerations in rules not showing
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor) (Show other bugs)
BRMS 5.2.0-ER1
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: manstis
Lukáš Petrovický
: Regression
Depends On:
  Show dependency treegraph
Reported: 2011-09-29 05:12 EDT by Zuzana Krejčová
Modified: 2016-07-31 21:12 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Zuzana Krejčová 2011-09-29 05:12:28 EDT
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 05:13:32 EDT
Created attachment 525492 [details]
after step 4 and clicking Add more options...
Comment 2 Zuzana Krejčová 2011-09-29 05:20:05 EDT
Created attachment 525493 [details]
POJO model
Comment 3 manstis 2011-09-29 17:25:58 EDT
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 17:27:08 EDT
Created attachment 525648 [details]
screen shot showing issue of nested fact type enumerations.
Comment 5 Zuzana Krejčová 2011-09-30 09:15:07 EDT
Works well, thanks. Will look at the issue you mentioned and create a new BZ.
Comment 6 manstis 2011-09-30 09:17:31 EDT
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.