]
Toni Rikkola commented on JBRULES-2456:
---------------------------------------
Thank you for the patch, I'll take a look at it right away.
Field completion in guided rule editor doesn't show camel-case
'multi-words' java beans properties
--------------------------------------------------------------------------------------------------
Key: JBRULES-2456
URL:
https://jira.jboss.org/jira/browse/JBRULES-2456
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-guvnor
Affects Versions: FUTURE
Environment: windows
Reporter: Guillaume HOLLER
Assignee: Toni Rikkola
Attachments: Agent.java, BRMSSuggestionCompletionLoaderTest.java,
SuggestionCompletionLoader.java
I have attached an example model class and the modified
BRMSSuggestionCompletionLoaderTest class (with the new testLoaderWithComplexFields
method) to demonstrate the issue.
The test shows that the SuggestionCompletionLoader exposes all javabean properties as
ModelFields but then fails to expose them in specific categories according to
accessor/mutator classification. In the test, only the fields for
which the assertion:
assert fieldName.equals(fieldName.toLowerCase())
is verified are exposed by methods
engine.getModelFields(FieldAccessorsAndMutators.[ACCESSOR|MUTATOR], "Agent"):
nom, prenom and sexe (and the keyword 'this' of course).
Consequence is for example that in guided editor, only this fields are proposed as
restriction fields in the WHEN side of the RULE .
I have found tha the problem lies in method loadClassFields of SuggestionCompletionLoader
and propose a patch (attached).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: