<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:"Calibri","sans-serif";
color:#1F497D'>Thanks W - I can work with this<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<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:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <b>On Behalf Of </b>Wolfgang Laun<br>
<b>Sent:</b> 21 June 2011 18:40<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> Re: [rules-users] Rule Templates - comma separated data<o:p></o:p></span></p>

</div>

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

<p class=MsoNormal style='margin-bottom:12.0pt'>The operators &quot;in&quot;
and &quot;not in&quot; operate on parenthesized lists of operands. They can be
used with a single template parameter expanding as a list.<br>
<br>
&nbsp;&nbsp; Person( likes in ( &quot;apple&quot;, &quot;banana&quot;,
&quot;chili&quot; ) )<br>
<br>
is the same as<br>
<br>
&nbsp; Person( likes == &quot;apple&quot; || == &quot;banana&quot; || ==
&quot;chili&quot; )<br>
<br>
-W<br>
&nbsp; <br>
<br>
<o:p></o:p></p>

<div>

<p class=MsoNormal>On 21 June 2011 18:34, Witham, Darren &lt;<a
href="mailto:darren.witham@citi.com">darren.witham@citi.com</a>&gt; wrote:<o:p></o:p></p>

<p class=MsoNormal>I have successfully generated a .drl file from a decision
table. The column headers in this table made use of the forall(||) construct
which happily parsed the corresponding comma separated data in the relevant
spreadsheet cell to nice || separated conditions.<br>
<br>
We have since decided to use the template approach so we can store rule data in
a db. We ideally want to store this data as key/value pairs in a db table where
the values may contain comma separated data. The intention being these values
would be processed as per the decision table.<br>
<br>
How is this achieved using a template ? I note that a column can be denoted as
an array column by adding [] i.e.<br>
<br>
template header<br>
column[]<br>
<br>
<br>
However, although this appears create an ArrayColumn parser, and splits the
comma separated data when running through a debugger, any attempt to access it
in the template falls over in mvel code trying to call HashMap.column<br>
<br>
<br>
Any examples on how to set this up ?<br>
<br>
Thx<br>
<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><o:p></o:p></p>

</div>

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

</div>

</body>

</html>