AFAIK, it's the accumulate portion of the rule; not the from, that is under review here.<br><br><div class="gmail_quote">2011/3/25 Swindells, Thomas <span dir="ltr"><<a href="mailto:TSwindells@nds.com">TSwindells@nds.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-GB">
<div>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">I thought from was effectively typeless (as it’s operating against a List it can’t always know the type of the members anyway) and so it allows any type on
teh left – giving a runtime class cast exception if it can’t do the conversion. Therefore if you know they type you are expecting you can still use it on the LHS with whatever constraints you want?</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Thomas</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-width: medium medium medium 1.5pt; border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; padding: 0cm 0cm 0cm 4pt;">
<div>
<div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0cm 0cm;">
<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>]
<b>On Behalf Of </b>Wolfgang Laun<br>
<b>Sent:</b> 25 March 2011 09:23<br>
<b>To:</b> Rules Users List<div><div></div><div class="h5"><br>
<b>Subject:</b> Re: [rules-users] accumulate min over java.util.Date</div></div></span></p>
</div>
</div><div><div></div><div class="h5">
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-bottom: 12pt;">Now don't be hasty with a JIRA. Using Comparable for the arguments of the min and max accumulate functions will give you a result that is -- Comparable. So:<br>
<br>
$min: Comparable() from accumulate( Schedule( $d: date ), min( $d ) )<br>
<br>
OK, this will give you the minimum data, bound to $min, although it won't let you write any constraint for the "Comparable" result fact. But, what's worse, it will not let you write<br>
<br>
$min: Number( intValue > 100 ) from accumulate( X( $y: y ), min( $y ) )<br>
<br>
any more (unless I'm very much mistaken).<br>
<br>
-W<br>
<br>
<br>
</p>
<div>
<p class="MsoNormal">On 25 March 2011 03:56, Greg Barton <<a href="mailto:greg_barton@yahoo.com" target="_blank">greg_barton@yahoo.com</a>> wrote:</p>
<p class="MsoNormal">Well, if it can work that way it should. I'd say open a JIRA and request that feature. It works with the "principle of least confusion." :)</p>
<div>
<p class="MsoNormal"><br>
--- On Thu, 3/24/11, jkrupka <<a href="mailto:jkrupka@gmail.com" target="_blank">jkrupka@gmail.com</a>> wrote:<br>
<br>
> From: jkrupka <<a href="mailto:jkrupka@gmail.com" target="_blank">jkrupka@gmail.com</a>></p>
</div>
<p class="MsoNormal">> Subject: Re: [rules-users] accumulate min over java.util.Date</p>
<div>
<p class="MsoNormal">> To: <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a></p>
</div>
<p class="MsoNormal">> Date: Thursday, March 24, 2011, 8:26 PM</p>
<div>
<div>
<p class="MsoNormal">> Yea the docs weren't really clear<br>
> about it, so I just thought it would work<br>
> for anything that implemented Comparable =)<br>
><br>
> Yep, used the long from getTime() - not the prettiest way<br>
> of doing it, but<br>
> it works great.<br>
><br>
> Thanks!<br>
><br>
> --<br>
> View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/accumulate-min-over-java-util-Date-tp2726081p2728477.html" target="_blank">
http://drools-java-rules-engine.46999.n3.nabble.com/accumulate-min-over-java-util-Date-tp2726081p2728477.html</a><br>
> Sent from the Drools - User mailing list archive at<br>
> Nabble.com.<br>
> _______________________________________________<br>
> rules-users mailing list<br>
> <a href="mailto:rules-users@lists.jboss.org" target="_blank">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><br>
><br>
<br>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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></p>
</div>
</div>
</div>
<p class="MsoNormal"> </p>
</div></div></div>
</div>
<br>
<hr>
<font color="Gray" face="Arial" 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 <a href="mailto:postmaster@nds.com" target="_blank">postmaster@nds.com</a> 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>
</div>
<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><br>
<br></blockquote></div><br>