Bug 1053413 - Business Central throws validation error with "$" while using enumeration in Guided Rule Editor
Summary: Business Central throws validation error with "$" while using enumeration in ...
Keywords:
Status: CLOSED DUPLICATE of bug 1047879
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: All
OS: All
high
high
Target Milestone: ---
: ---
Assignee: Toni Rikkola
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-15 08:27 UTC by Musharraf Hussain
Modified: 2018-12-04 16:59 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-01-16 13:48:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Musharraf Hussain 2014-01-15 08:27:04 UTC
Description of problem:
Let's say an enumeration is defined in a class in the following fashion:
~~~
public class EnumeratedFact {

     private EnumeratedFact.TestEnum enum;
     private String firstName;
     private String lastName;
...
     public enum TestEnum {
     ...

     }
...
~~~
Now, in order to use it to draft a rule through Guided Rule Editor while attempting to "Import" the enumeration in "Config" tab, the enumeration is displayed having the "$" sign in the class name instead of "." . Java uses "$" internally for inner classes, hence Business Central should use "." instead. Now, while writing the rule in form of a "Add free form drl" option, where the rule is written that uses the enurmeration having the name like "EnumeratedFact.TestEnum.XYZ" . As soon as the rule is saved and the Guided Rule Editor refreshes the rule , it converts the enumeration appearing in the form of having a "$" sign in it's class name, like "EnumeratedFact$TestEnum.XYZ". This causes a validation error for that rule in Business Central.
~~~
ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] (pool-18-thread-3) Unable to build KieBaseModel:defaultKieBase
Unable to Analyse Expression 
...
[Error: unable to resolve method using strict-mode: org.drools.core.spi.KnowledgeHelper.EnumeratedFact$TestEnum()]
[Near : {... EnumeratedFact$TestEnum.XYZ ....}]
~~~

Unfortunately, there doesn't seem to exist any workaround for this issue, except of using DRL editors to write a rule with such an enumeration.

Version-Release number of selected component (if applicable):
- Red Hat JBoss BRMS 6.0.0 Beta

How reproducible:
- Follow the description above

Steps to Reproduce:
1. Follow the description above
2.
3.

Actual results:
- The enumeration appears having a "$" sign in the name

Expected results:
- The enumeration should appear with the naming convention like "EnumeratedFact.TestEnum"

Additional info:
-NA

Comment 5 Toni Rikkola 2014-01-16 13:48:11 UTC

*** This bug has been marked as a duplicate of bug 1047879 ***


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