<p dir="ltr">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.</p>
<p dir="ltr">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.</p>
<p dir="ltr">Sent on the move</p>
<div class="gmail_quote">On 4 Dec 2013 20:50, "marjan.sterjev" <<a href="mailto:sterjevm@mt.net.mk">sterjevm@mt.net.mk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
I’m trying to implement Guided Rule Template in KIE WB (Guvnor).<br>
<br>
The logic is simple: The Condition shall check range of ages and for action<br>
call a method on a global.<br>
<br>
The global is defined in Global Variables artifact.<br>
<br>
I can see two problems with the editor:<br>
<br>
1. I can choose the global variable (Call method on ‘global variable’).<br>
However the global is not defined in the Source Code (for example: global<br>
MessageCollection $messages).<br>
<br>
2. The editor for Call method on ‘global variable’ allows to choose only<br>
literal arguments. How about Template Keys? It seems natural to define<br>
Template Keys for conditions and action callbacks as well.<br>
<br>
Because of 1) when executing the rules, I have Null Pointer Exception.<br>
<br>
In short what should I do in order to insert the global variable declaration<br>
on the top of rules file (in the Guided Rule Template)?<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Guided-Rule-Template-globals-tp4027096.html" target="_blank">http://drools.46999.n3.nabble.com/Guided-Rule-Template-globals-tp4027096.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></blockquote></div>