No - you can use any java object as a fact, so both of your classes are fine. For instance you could do:<br><br>when<br>&nbsp; Car($p: paint)<br>then<br>&nbsp; System.out.println($p.getName());<br>end<br><br>and using MVEL you could do:
<br><br>
when<br>
&nbsp; Car(<a href="http://paint.name">paint.name</a> == &quot;red&quot;)<br>
then<br>
&nbsp; ...<br>&nbsp;
 <br><br><div><span class="gmail_quote">On 10/4/07, <b class="gmail_sendername">jack wu</b> &lt;<a href="mailto:jackxwu@yahoo.com">jackxwu@yahoo.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 10pt;"><div>Hi, i suppose the second form of fact is not supported. but i&#39;d like to confirm. <br><br>in other words, you can only have setters and getters that return basic java types. is that right? can i return java collections such as array and map? the documentation is not clear on that.
<br><br>thanks.<br><br>public class Paint<br>{<br>&nbsp;&nbsp;&nbsp; String getName();<br>&nbsp;&nbsp;&nbsp; String getColor();<br>}<br><br><br>public class Car<br>{<br>&nbsp;&nbsp;&nbsp; int getSize();<br>&nbsp;&nbsp;&nbsp; Paint getPaint();<br>}<br><br><br>jack.<br><br><br></div>
</div><br>
      <hr size="1">Got a little couch potato? <br>
Check out fun <a href="http://us.rd.yahoo.com/evt=48248/*http://search.yahoo.com/search?fr=oni_on_mail&amp;p=summer+activities+for+kids&amp;cs=bz" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">summer activities for kids.
</a></div><br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote></div>
<br><br clear="all"><br>-- <br>Steven Williams<br><br>Supervising Consultant<br><br>Object Consulting<br>Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501<br><a href="mailto:steven.williams@objectconsulting.com.au">steven.williams@objectconsulting.com.au
</a><br><a href="http://www.objectconsulting.com.au">www.objectconsulting.com.au</a><br><br>consulting | development | training | support<br>our experience makes the difference