<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;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-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-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</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=Section1>

<p class=MsoNormal>I&#8217;ve got a fact which contains a collection (a set of
strings to be precise). I want to write a rule which fires if there are any
invalid values (where the valid values are defined as a list).<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>What I&#8217;m trying to do is express this within a
decision table.<o:p></o:p></p>

<p class=MsoNormal>Expressed as a drl rule the following works:<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#960000'>rule</span></b><span style='font-size:
10.0pt;font-family:"Courier New";color:black'> </span><span style='font-size:
10.0pt;font-family:"Courier New";color:green'>&quot;ValidateList&quot;</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#960000'>when</span></b><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fact(col
: collection != </span><b><span style='font-size:10.0pt;font-family:"Courier New";
color:#960000'>null</span></b><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>)</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String(</span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#960000'>this</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#960000'>not</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#960000'>in</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> (</span><span
style='font-size:10.0pt;font-family:"Courier New";color:green'>$param</span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>)) </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#960000'>from</span></b><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> col</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='font-size:10.0pt;font-family:"Courier New";color:#960000'>Then<o:p></o:p></span></b></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#960000'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #generate
error</span></b><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Courier New";
color:#960000'>End<o:p></o:p></span></b></p>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Courier New";
color:#960000'><o:p>&nbsp;</o:p></span></b></p>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Courier New";
color:#960000'>Where $param = &#8216;&#8220;1&#8221;, &#8220;3&#8221;, &#8220;valid&#8221;&#8217;<o:p></o:p></span></b></p>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Courier New";
color:#960000'><o:p>&nbsp;</o:p></span></b></p>

<p class=MsoNormal>The decision tables seem to assume that the fact type is the
last element in the line and then appends &#8220;( conditions... )&#8221; this
means there is no way to then insert a &#8220;from ...&#8221; after it.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Does anybody know either a different way to structure the rule
so that I don&#8217;t need a from or a way to get the decision table to use it?
(unfortunately adding the collection directly as a fact isn&#8217;t an option).<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Thanks,<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Thomas<o:p></o:p></p>

</div>

<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>**************************************************************************************</body>

</html>