Do you set the global to an object in *your* runtime? The global definition will exist in your project but will need initialising to an object by your code.
If the editor lacks a feature you require why not roll your sleeves up and provide a pull request? We don't normally have the time to respond to feature requests as quickly as the proposer would like. Sent on the move On 4 Dec 2013 20:50, "marjan.sterjev" <[email protected]> wrote: > Hi, > I’m trying to implement Guided Rule Template in KIE WB (Guvnor). > > The logic is simple: The Condition shall check range of ages and for action > call a method on a global. > > The global is defined in Global Variables artifact. > > I can see two problems with the editor: > > 1. I can choose the global variable (Call method on ‘global > variable’). > However the global is not defined in the Source Code (for example: global > MessageCollection $messages). > > 2. The editor for Call method on ‘global variable’ allows to choose > only > literal arguments. How about Template Keys? It seems natural to define > Template Keys for conditions and action callbacks as well. > > Because of 1) when executing the rules, I have Null Pointer Exception. > > In short what should I do in order to insert the global variable > declaration > on the top of rules file (in the Guided Rule Template)? > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Guided-Rule-Template-globals-tp4027096.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
