|
Hi,
I have nested classes in the domain model and I imported these nested classes in order to use them in the guided editor. Things are ok except when one of the rule required a custom java function, then I would get an error at 'build' package time (the error is 'not able to resolve TcItem$Dataset'). I think the compiler didn't like the '$' in the list of imported statements. But if I don't import these nested classes, I won't be able to use them in the guided editor. I am new to Drools so I think there must be a way to be able to use nested class (w/ '$') and custom java functions together. Please advise. I am using Guvnor 5.2 final. Thanks. |
|
Hi,
This was a bug, but has been fixed for 5.4.0.Final. The only workaround is to move the enumerations to their own class, rather than nest in another Class. https://bugzilla.redhat.com/show_bug.cgi?id=724629 With kind regards, Mike On 23 April 2012 14:12, TonyN <[hidden email]> wrote: Hi, _______________________________________________ rules-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/rules-users |
|
In reply to this post by TonyN
To import a class B nested in class x.y.A, you'd use
import x.y.A.B (Actually, '$' is legal in Java names, so there must be another reason for not being able to resolve a name.) -W On 23/04/2012, TonyN <[hidden email]> wrote: > Hi, > > I have nested classes in the domain model and I imported these nested > classes in order to use them in the guided editor. Things are ok except > when one of the rule required a custom java function, then I would get an > error at 'build' package time (the error is 'not able to resolve > TcItem$Dataset'). I think the compiler didn't like the '$' in the list of > imported statements. But if I don't import these nested classes, I won't be > able to use them in the guided editor. > > I am new to Drools so I think there must be a way to be able to use nested > class (w/ '$') and custom java functions together. > > Please advise. > > I am using Guvnor 5.2 final. > > Thanks. > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Nested-class-BRL-and-Java-error-tp3932432p3932432.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [hidden email] > https://lists.jboss.org/mailman/listinfo/rules-users > rules-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/rules-users |
|
In reply to this post by manstis
Hi,
I downloaded the Guvnor 5.4.0 CR1 and problem is still there (I am assuming the fix is in this CR release too?). I would like to send this image to show one of class in the domain model that contains nested classes. TcItem contains Dataset contains NamedReferences ![]() Thx |
|
Nope, I meant 5.4.0.Final - as I typed :)
Can you create a JIRA (https://issues.jboss.org/browse/GUVNOR) and attach a repository export demonstrating the problem. I can take a look to check it's working as you require with (what will become) 5.4.0.Final. Otherwise, it'll be a bug and need fixing anyway. With kind regards, Mike
On 23 April 2012 17:34, TonyN <[hidden email]> wrote: Hi, _______________________________________________ rules-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/rules-users |
|
Thanks Mike...will do!
|
| Powered by Nabble | Edit this page |
