<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="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 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
..shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:Verdana;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:Verdana;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'>Yes that’s the simple one, but I
can’t send the NameValue, I will send only the LineItem<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>Anstis, Michael (M.)<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, October 03, 2007
5:36 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Rules Users List<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [rules-users] Arrays
help</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>I forgot to mention, this assumes you want
to maintain the relationships. If you're not interested in these but merely
want to process all NameValue objects then a simple rule works fine:-</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>rule "don't
worry about preserving relationships"</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>
when</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>
$n : NameValue ( )</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>
then</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>
....</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>end</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>Simply assert all NameValue objects.</span></font><o:p></o:p></p>
<blockquote style='margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabIndex=-1>
</span></font></div>
<p class=MsoNormal style='margin-bottom:12.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Anstis,
Michael (M.) <br>
<b><span style='font-weight:bold'>Sent:</span></b> 03 October 2007 12:48<br>
<b><span style='font-weight:bold'>To:</span></b> 'Rules Users List'<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [rules-users] Arrays
help</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>There are a number of ways...</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><em><b><i><font size=2 color=blue face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:blue;font-weight:bold'>Java dialect
[requires LineItem, Parameter and NameValue to be asserted into working memory]</span></font></i></b></em><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>rule "a -
requires object model change for parent property"</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font size=2
color=blue face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>when</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>$l : LineItem( )</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>$p : Parameter ( parent == $l )</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>$n : NameValue( parent == $p )</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font size=2
color=blue face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>then</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>...</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>end</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>rule
"b"</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font size=2
color=blue face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>when</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>$n : NameValue( )</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>$p : Parameter ( nameValues contains $n )</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>$l : LineItem( parameters contains $p )</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font size=2
color=blue face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>then</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>...</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>end</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><em><b><i><font size=2 color=blue face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:blue;font-weight:bold'>MVEL
dialect</span></font></i></b></em><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>rule
"c"</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font size=2
color=blue face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>dialect mvel</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font size=2
color=blue face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>when</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>$n :
my-mvel-syntax-lets-me-down-but-I-know-you-can-traverse-object-graphs-using-it</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font size=2
color=blue face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>then</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> </span></font><font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>...</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>end</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<blockquote style='margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabIndex=-1>
</span></font></div>
<p class=MsoNormal style='margin-bottom:12.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Bhattacharya, Sougata<br>
<b><span style='font-weight:bold'>Sent:</span></b> 03 October 2007 12:37<br>
<b><span style='font-weight:bold'>To:</span></b> Rules Users List<br>
<b><span style='font-weight:bold'>Subject:</span></b> [rules-users] Arrays help</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'>Hi All,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'> I have a object graph like this<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'>LineItem has array of Parameter and each
Parameter has array of NameValue and Namevalue object has name and value.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'>Now I have LineItem object in working
memory, how to test the value of each value of NameValue object.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'>LineItem</span></font><font size=2
color=blue face=Wingdings><span style='font-size:10.0pt;font-family:Wingdings;
color:blue'>à</span></font><font size=2 color=blue face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:blue'>getParameters() returns
Parameter[]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'>Parameter->getNameValueArray() return
NameValue[]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'>Each NameValue has name and value
attribute<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'>Any help?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'>Ta<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:blue'>Sougata<o:p></o:p></span></font></p>
<table class=MsoNormalTable border=0 cellpadding=0>
<tr>
<td bgcolor=white style='background:white;padding:.75pt .75pt ..75pt .75pt'>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'>This
message contains information that may be privileged or confidential and is
the property of the Capgemini Group. It is intended only for the person to
whom it is addressed. If you are not the intended recipient, you are not
authorized to read, print, retain, copy, disseminate, distribute, or use this
message or any part thereof. If you receive this message in error, please
notify the sender immediately and delete all copies of this message.</span></font><o:p></o:p></p>
</td>
</tr>
</table>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</blockquote>
</blockquote>
</div>
</body>
</html>
<table><tr><td bgcolor=#ffffff><font color=#000000>This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.<br>
<br>
</font></td></tr></table>