<div><br></div>    Actually he can. Just use a simple trick and the mvel inline collection syntax:<div><br></div><div>$name: String() from  return( [&quot;a&quot;, &quot;b&quot;, &quot;c&quot; ] )<br><br></div><div>    Just to explain: in MVEL, you can inline create a collection by using [ ]. The DRL syntax does not allow you to use [] directly, but you can use a &quot;return&quot; statement to wrap the [] and return the collection created inline. </div>
<div><br></div><div>    Yes, I know that ideally we should not need the &quot;return&quot;, but for now, the parser requires it and due to some ambiguities in the grammar we could not get rid of this limitation yet. Maybe in the future.</div>
<div><br></div><div>    Edson</div><div><br><div class="gmail_quote">2010/6/23 Swindells, Thomas <span dir="ltr">&lt;<a href="mailto:TSwindells@nds.com">TSwindells@nds.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I don&#39;t think you can unfortunately.<br>
You&#39;ve got a number of options:<br>
1. define a global (in sheet headers) and insert the actual values from code (perhaps reading from the spreadsheet).<br>
2. Define a custom datatype &quot;Name&quot;, have a table with which each row inserts a Name object with associated value and then use it in your when clause like any other fact.<br>
3. Have a separate row for each name, use activation groups or inserting a lock/latch object, or insert logical chaining so that the then part is only executed once.<br>
<div class="im"><br>
Thomas<br>
<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 LeoIo<br>
</div><div><div></div><div class="h5">&gt; Sent: 23 June 2010 15:09<br>
&gt; To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; Subject: Re: [rules-users] &quot;Not exists&quot; on at least one element from the set<br>
&gt;<br>
&gt;<br>
&gt; Thanks for the fast response.<br>
&gt; I am using excel decision tables and can&#39;t set globals with values from the<br>
&gt; cells.<br>
&gt; I can only use brown fields and through $param refer to the contents of the<br>
&gt; cell.<br>
&gt; That leads me to a question.<br>
&gt; Can I define $collection in the when statement?<br>
&gt; something like this:<br>
&gt;<br>
&gt; when<br>
&gt;   exists (<br>
&gt;   $name: String from (&#39;a&#39;,&#39;b&#39;,&#39;c&#39;)<br>
&gt;   not Object(name == $name)<br>
&gt;   )<br>
&gt; then<br>
&gt;<br>
&gt; Much obliged.<br>
&gt; --<br>
&gt; View this message in context: <a href="http://drools-java-rules-" target="_blank">http://drools-java-rules-</a><br>
&gt; <a href="http://engine.46999.n3.nabble.com/Not-exists-on-at-least-one-element-from-the-set-" target="_blank">engine.46999.n3.nabble.com/Not-exists-on-at-least-one-element-from-the-set-</a><br>
&gt; tp916375p916887.html<br>
&gt; Sent from the Drools - User mailing list archive at Nabble.com.<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><div class="im">**************************************************************************************<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>
<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">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>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>