That&#39;s right.. globals are usually used to access to external services and usually you don&#39;t want to do inferences over that global references. Global are not facts. If you want to do inferences create a fact :)<br>
<br>Cheers<br><br><div class="gmail_quote">On Mon, Jul 18, 2011 at 3:55 PM, Swindells, Thomas <span dir="ltr">&lt;<a href="mailto:TSwindells@nds.com">TSwindells@nds.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Don&#39;t use a global, instead create a new fact type &quot;Global&quot; having a single field globalVariable (type object will probably do), then you can pretty much write what you have below (once you add the missing bracket).<br>

Alternatively you may be able to do something like eval(Arrays.asList(&quot;X&quot;, &quot;Y&quot;).contains(globalVariable))<br>
<br>
Thomas<br>
<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-">rules-users-</a><br>
&gt; <a href="mailto:bounces@lists.jboss.org">bounces@lists.jboss.org</a>] On Behalf Of pamerida<br>
&gt; Sent: 18 July 2011 19:09<br>
&gt; To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; Subject: [rules-users] Global variable in LHS<br>
<div><div></div><div class="h5">&gt;<br>
&gt; Hi everybody,<br>
&gt;<br>
&gt; I would like to analyze a global value in the LHS of my rule without using an<br>
&gt; eval, something like this:<br>
&gt;<br>
&gt;<br>
&gt;         global String globalVariable;<br>
&gt;<br>
&gt;       rule &#39;SI-002-NAD-6&#39;<br>
&gt;       salience 5000<br>
&gt;       when<br>
&gt;       global (globalVariable in (&quot;X&quot;,&quot;Y&quot;)<br>
&gt;       then<br>
&gt;       logger.log(&quot;[SI-002-NAD-6] Debe colocar la información del<br>
&gt; propietario del medio de transporte.&quot;);<br>
&gt;       end<br>
&gt;<br>
&gt; I cant use eval because it doesnt recognize the keyword &quot;in&quot;, for example<br>
&gt; this code would throw me an error in the validation<br>
&gt;<br>
&gt;  global String globalVariable;<br>
&gt;<br>
&gt;       rule &#39;SI-002-NAD-6&#39;<br>
&gt;       salience 5000<br>
&gt;       when<br>
&gt;       eval (globalVariable in (&quot;X&quot;,&quot;Y&quot;)<br>
&gt;       then<br>
&gt;       logger.log(&quot;[SI-002-NAD-6] Debe colocar la información del<br>
&gt; propietario del medio de transporte.&quot;);<br>
&gt;       end<br>
&gt;<br>
&gt; any suggestions? thanks so much for your help :)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context: <a href="http://drools.46999.n3.nabble.com/Global-" target="_blank">http://drools.46999.n3.nabble.com/Global-</a><br>
&gt; variable-in-LHS-tp3180063p3180063.html<br>
&gt; Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<br>
</div></div>**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the <a href="mailto:postmaster@nds.com">postmaster@nds.com</a> and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.<br>

<br>
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************<br>
<div><div></div><div class="h5"><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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> - CTO @ <a href="http://www.plugtree.com">http://www.plugtree.com</a>  <br> - MyJourney @ <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br>
 - Co-Founder @ <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -<br>