Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1098124

Summary: Cannot use nested class as a fact in Guided Editor
Product: [Retired] JBoss BRMS Platform 6 Reporter: Jiri Locker <jlocker>
Component: Business CentralAssignee: manstis
Status: CLOSED EOL QA Contact: Lukáš Petrovický <lpetrovi>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.2CC: etirelli, kverlaen
Target Milestone: DR4   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:38:57 UTC Type: Bug
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
Outer.java none

Description Jiri Locker 2014-05-15 10:59:01 UTC
Created attachment 895841 [details]
Outer.java

Description of problem:
I have a class Outer with inner public static class Inner and inner:Inner field. I am able to work with inner field of Outer fact as described in bug 1086358. I am also able to add Inner as a standalone fact however this results in validation error and project build failure: Unable to resolve ObjectType 'Inner'.

Version-Release number of selected component (if applicable):
6.0.2.ER2, 6.0.1.GA

How reproducible:
-

Steps to Reproduce:
1. Add described Outer$Inner class to the project.
2. Create a guided rule in the same package, add condition on Inner fact.
3. Validate the rule and/or save it & build project

Actual results:
Validation and project build fails with: Unable to resolve ObjectType 'Inner'.

Expected results:
No validation or project build errors.

Additional info:

Comment 3 manstis 2014-05-21 15:07:12 UTC
The problem was that Inner needed to either be (a) qualified with Outer, or (b) imported. I elected to make the editor work the same as IDEA - i.e. the Inner class is qualified with the Outer class name (or needs to be imported in full if in a different package to the rule).

This leads to a rule:

rule "test"
when
  Outer.Inner( value == "abc" ) 
...

when created in the same package as the Outer type; or: 

import guvnor.bugs.dmo.Outer.Inner;

rule "test"
when
  Inner( value == "abc" )
...

when in a different package and Outer.Inner is imported with the Config tab.

Comment 4 Edson Tirelli 2014-06-10 16:23:47 UTC
This fix was deferred to 6.1.0.

Comment 5 Zuzana Krejčová 2014-12-10 08:37:14 UTC
Verified with ER2.