<html><body bgcolor="#FFFFFF"><div>+1 on the full constructor.<br><br>GreG</div><div><br>On Aug 9, 2010, at 3:58 PM, Edson Tirelli &lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>&nbsp;&nbsp; &nbsp;I thought about adding that, but I feel like we would just be reimplementing java, in this case. So, if you need anything else other than simple java beans, you should implement it as a java class.<div><br></div><div>&nbsp;&nbsp; &nbsp;Regarding the constructor, I might still add a constructor that receives all fields as parameters, just to reduce verbosity when using the java dialect, but if you are using mvel dialect, you can use "with":</div>
<div><br></div><div>rule ...</div><div>when ...</div><div>then</div><div>&nbsp;&nbsp; &nbsp;with( person = new Person() ) {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; name = "Bob",</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; age = 35</div><div>&nbsp;&nbsp; &nbsp;}</div><div>&nbsp;&nbsp; &nbsp;insert( person );</div>
<div>end</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp; &nbsp;Edson</div><div><div><br><div class="gmail_quote">2010/8/9 Tina Vießmann <span dir="ltr">&lt;<a href="mailto:tviessmann@stud.hs-bremen.de"><a href="mailto:tviessmann@stud.hs-bremen.de">tviessmann@stud.hs-bremen.de</a></a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
<br>
is it possible to define a function/constructor inside a fact type<br>
declaration? If yes, how can it be done?<br>
<br>
Thank you :)<br>
Tina<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
</blockquote></div><br><br clear="all"><br>-- <br>&nbsp; Edson Tirelli<br>&nbsp; JBoss Drools Core Development<br>&nbsp; JBoss by Red Hat @ <a href="http://www.jboss.com"><a href="http://www.jboss.com">www.jboss.com</a></a><br>
</div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>rules-users mailing list</span><br><span><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></span><br></div></blockquote><br>

      </body></html>