<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
-->
</style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">Ahh, cool,
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">Wish I had known that before, I&#8217;ve had to use some horrible regex &#8220;a|b|c&#8221; matches expressions in my current spreadsheet where this may have been easier.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">Thomas
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:
&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;
font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
<b>On Behalf Of </b>Edson Tirelli<br>
<b>Sent:</b> 23 June 2010 15:38<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> Re: [rules-users] &quot;Not exists&quot; on at least one element from the set<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp;Actually he can. Just use a simple trick and the mvel inline collection syntax:<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">$name: String() from &nbsp;return( [&quot;a&quot;, &quot;b&quot;, &quot;c&quot; ] )<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp;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.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp;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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp;Edson<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">2010/6/23 Swindells, Thomas &lt;<a href="mailto:TSwindells@nds.com">TSwindells@nds.com</a>&gt;<o:p></o:p></p>
<p class="MsoNormal">I don't think you can unfortunately.<br>
You'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.<o:p></o:p></p>
<div>
<p class="MsoNormal"><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<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">&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'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; &nbsp; exists (<br>
&gt; &nbsp; $name: String from ('a','b','c')<br>
&gt; &nbsp; not Object(name == $name)<br>
&gt; &nbsp; )<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>
<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal">**************************************************************************************<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>
_______________________________________________<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">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><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <br>
&nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><o:p></o:p></p>
</div>
</div>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com 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>
</font>
</body>
</html>