Bug 742149

Summary: Enumerations in rules not showing
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Zuzana Krejčová <zkrejcov>
Component: BRM (Guvnor)Assignee: manstis
Status: VERIFIED --- QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.2.0-ER1CC: manstis
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
after step 4
none
after step 4 and clicking Add more options...
none
POJO model
none
screen shot showing issue of nested fact type enumerations. none

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.