How would you use a class with private members and no getters in any other
Java application?
If you want the members of the class to influence rules you're going to
have to expose them somehow.
Even if you set the global at the same time as you set the class's member
you are effectively trying to use globals as a substitute for objects of
your class.
If you really, really can't expose members of the class then perhaps you
should:-
- Question why you need to use it in a rule in the first place, or
- Use a Declared Type
On 10 February 2012 10:43, ehmkey <ehmkey(a)gmail.com> wrote:
Hey all,
i have a class with private members and no getters. I realized my rules
with
the 'global' keyword. I read that global isnt good for every case, does a a
better solution exist?
public class example {
private int number;
..
..
}
*.drl:
package example;
global int number;
rule ....
Thank you!
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-user-problem-with-private-members...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users