<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.ul-threaded
        {mso-style-name:ul-threaded;}
span.connect
        {mso-style-name:connect;}
span.li-threaded
        {mso-style-name:li-threaded;}
span.threaded
        {mso-style-name:threaded;}
span.post-middle
        {mso-style-name:post-middle;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.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"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">Have you tried making your classes beans?<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">Eg adding getters and setters. (As a style guide in java you should generally avoid public fields and class names should start with a capital letter).<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">This would give you the following:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:#7F0055">public</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">class</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
<u>Message</u> {</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">private</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black"> Numbers[]
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#0000C0">numbersArray</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">protected</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black"> Numbers[]
<u>getNumbersArray()</u> {</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">return</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#0000C0">numbersArray</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp; }</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">protected</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">void</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
<u>setNumbersArray(Numbers[] numbersArray)</u> {</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">this</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">.</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#0000C0">numbersArray</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
 = numbersArray;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp; }</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">}</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><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" style="text-autospace:none"><b><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:#7F0055">public</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">class</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
<u>Numbers</u> {</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">private</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">int</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#0000C0">first</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">private</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">int</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#0000C0">last</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">protected</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">int</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
<u>getFirst()</u> {</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">return</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#0000C0">first</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp; }</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">protected</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">void</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
<u>setFirst(</u></span><b><u><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">int</span></u></b><u><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black"> first)</span></u><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
 {</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">this</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">.</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#0000C0">first</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
 = first;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp; }</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">protected</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">int</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
<u>getLast()</u> {</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">return</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#0000C0">last</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp; }</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">protected</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">void</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
<u>setLast(</u></span><b><u><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">int</span></u></b><u><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black"> last)</span></u><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
 {</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#7F0055">this</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">.</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#0000C0">last</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">
 = last;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:black">&nbsp;&nbsp;&nbsp; }</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">}</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><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>stefano corna<br>
<b>Sent:</b> 14 December 2009 11:00<br>
<b>To:</b> rules-users@lists.jboss.org<br>
<b>Subject:</b> [rules-users] rule on Array of custom Object<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span class="post-middle">hello, </span><br>
<span class="post-middle">im using drools 5.0 on eclipse and i have a problem. i want to use an array of object in my rule condition.
</span><br>
<span class="post-middle">now i try to explain: </span><br>
<span class="post-middle">i have my java class with the array attribute </span><br>
<span class="post-middle">------------------------------------------------- </span>
<br>
<span class="post-middle">public static class Message { </span><br>
<br>
<span class="post-middle">&nbsp; &nbsp;public numbers[] numbersArray; </span><br>
<br>
<span class="post-middle">} </span><br>
<span class="post-middle">-------------------------------------------- </span><br>
<span class="post-middle">and the numbers class that rapresent the objects contained in numbersArray
</span><br>
<span class="post-middle">---------------------------------------------- </span><br>
<span class="post-middle">public static class numbers </span><br>
<span class="post-middle">{ </span><br>
<span class="post-middle">&nbsp; &nbsp;public int first; </span><br>
<span class="post-middle">&nbsp; &nbsp;public int last; </span><br>
<span class="post-middle">} </span><br>
<span class="post-middle">-------------------------------------------------- </span>
<br>
<span class="post-middle">my goal is make a rule that check if Message.numbersArray[0].first=&quot;value&quot;
</span><br>
<span class="post-middle">i use </span><br>
<span class="post-middle">------------------------------------------------- </span>
<br>
<span class="post-middle">rule &quot;rule_001&quot; </span><br>
<br>
<span class="post-middle">dialect &quot;mvel&quot; </span><br>
<span class="post-middle">when </span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; $msg : Message(numbersArray[0].first==&quot;1&quot;) </span>
<br>
<br>
<span class="post-middle">then </span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;something....&quot;); </span>
<br>
<span class="post-middle">end </span><br>
<span class="post-middle">------------------------------- </span><br>
<span class="post-middle">and on runtime it give me this error: </span><br>
<span class="post-middle">--------------------------------------- </span><br>
<span class="post-middle">org.drools.RuntimeDroolsException: Exception executing predicate numbersArray[0].first==&quot;1&quot;
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:279)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:143)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:360)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:344)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:185)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:146)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1046)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1001)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:788)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:216)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at com.sample.DroolsTest.main(DroolsTest.java:47)
</span><br>
<span class="post-middle">Caused by: [Error: unable to access property (null parent): first]
</span><br>
<span class="post-middle">[Near : {... Unknown ....}] </span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^ </span><br>
<span class="post-middle">[Line: 1, Column: 0] </span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:861)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:585)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:313)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:138)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:133)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:102)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:107)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel2.MVEL.executeExpression(MVEL.java:978)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:75)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:272)
</span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; ... 10 more </span><br>
<span class="post-middle">-------------------------------------------------------
</span><br>
<span class="post-middle">moreover if i try to print the &quot;first&quot; value: </span><br>
<span class="post-middle">. </span><br>
<span class="post-middle">. </span><br>
<span class="post-middle">. </span><br>
<span class="post-middle">then </span><br>
<span class="post-middle">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(numbersArray[0].first);
</span><br>
<span class="post-middle">end </span><br>
<span class="post-middle">appear this new error and i cant compile: </span><br>
<span class="post-middle">&quot;BuildError: Unable to build expression for 'consequence': Failed to compile: 1 compilation error(s):
</span><br>
<span class="post-middle">&nbsp;- (1,12) unqualified type in strict mode for: numbersArray' System.out.println(numbersArray[0].first);
</span><br>
<span class="post-middle">'&quot; </span><br>
<br>
<span class="post-middle">someone can kindly help me? </span><o:p></o:p></p>
</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><br>
<hr>
<font face="Arial" color="Gray" size="1">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.<br>
To protect the environment please do not print this e-mail unless necessary.<br>
<br>
An NDS Group Limited company. www.nds.com<br>
</font>
</body>
</html>