Hello,<div><br></div><div>Thanks for your response!</div><div><br></div><div>But I don&#39;t understand why such a rule with a high salience which looks like:</div><div><br></div><div>global int VARIABLE;</div><div><br></div>
<div>rule &quot;init&quot;</div><div>  salience 999;</div><div>  when</div><div>    (eval(true))</div><div>  then</div><div>    VARIABLE = 1;</div><div>end</div><div><br></div><div>would fire only once?</div><div><br></div>
<div>Thank you,</div><div>Martin<br><br><div class="gmail_quote">2011/10/20 Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
You can do this by setting the global from a high salience rule from within your DRL. Leave the conition empty - such a rule only fires once.<br>-W<br><br><div class="gmail_quote">2011/10/20 Martin A <span dir="ltr">&lt;<a href="mailto:wmlsub@gmail.com" target="_blank">wmlsub@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div><div></div><div class="h5">Hello,<div><br></div><div>I&#39;d like to set global rules variables at the top of a rules file, like so:</div>

<div><br></div><div>global int WELCOME_SCREEN = 1;</div><div><br></div><div>so that I may easily refer to them from inside the rules, instead of hardcoding them somewhere in code. Is this possible?</div>
<div><br></div><div>Best regards,</div><div>Martin</div>
<br></div></div><div class="im">_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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><br>
<br></div></blockquote></div><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><br>
<br></blockquote></div><br></div>