[
https://issues.redhat.com/browse/DROOLS-1741?page=com.atlassian.jira.plug...
]
Mario Fusco resolved DROOLS-1741.
---------------------------------
Resolution: Won't Fix
If Drools would allow a syntax like
{code}
ObjectA( objectB. ( (someFunction(someVariable)) == 0 ) )
{code}
it would be not only highly confusing but even ambiguous. It is much simpler and clearer
to use a more Java-like syntax here like in
{code}
ObjectA( someFunction(objectB.someVariable) == 0 ) )
{code}
Using a function in nested objects
----------------------------------
Key: DROOLS-1741
URL:
https://issues.redhat.com/browse/DROOLS-1741
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 6.5.0.Final
Environment: Drools 6.5.0.Final
JDK 1.8
Reporter: R D
Assignee: Mario Fusco
Priority: Minor
Attachments: Compilation_error.PNG, Compilation_error.PNG
I am working with a project with nested objects.
I have a rule in which I need to make use of a function. If I use this function on a
variable in a nested object it does not work (I get a compilation error):
Using the nested object accessor approach (compilation error "Unable to Analyse
Expression"):
ObjectA( objectB. ( (someFunction(someVariable)) == 0 ) )
EDIT: The same compilation error occurs as well when just using a more complex operation
on variables in nested objects as well (updated project on GitHub):
ObjectA( objectB. ( (someVariable == 0 || someVariable == 1 ) || (someVariable
> -1 || someVariable < 2 )) )
--
This message was sent by Atlassian Jira
(v7.13.8#713008)