<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hello,<br>Ok, I understand the problem. dDeb is indeed a Date type.<br>What is the proper/simplest way to achieve such a comparison ?<br>Thank you in advance for your help.<br>Regards,<br>Benoît<br><br><hr id="stopSpelling">Date: Thu, 4 Mar 2010 10:01:23 +0000<br>From: ejdiggins@gmail.com<br>To: rules-users@lists.jboss.org<br>Subject: Re: [rules-users] Problem with date<br><br>Hi,<br><br>What is the type of the dDeb field? It looks like you're trying to check if a date is less than a string.<br><br>Enda<br><br><div class="ecxgmail_quote">2010/3/3 Bertrand Grottier <span dir="ltr"><<a href="mailto:b_grottier@hotmail.com">b_grottier@hotmail.com</a>></span><br>
<blockquote class="ecxgmail_quote" style="padding-left: 1ex;">
<div>
Dear all,<br><br>I am a newbie with Drools (Drools 5). I just want to make a date comparison but failed until now. Here is my drl file :<br><br>package com.sample<br> <br>import com.sample.DroolsTest.Produit;<br><br> <br>
rule "Prix premier semestre"<br> when<br> p1 : Produit( dDeb < "01-Jan-2010" )<br> then<br> p1.setPrix( 10 );<br> update( p1 );<br>end<br><br>I get a build error in Eclipse : Unable to create restriction.<br>
<br>This must be an obvious problem but I am struggling for a while now.<br><br>Any help would be appreciated.<br><br>Benoit<br>                                            <br><hr>Commander un cadeau en ligne discrètement? <a href="http://clk.atdmt.com/FRM/go/207186971/direct/01/">Voir la solution offerte par Internet Explorer8</a></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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Enda J Diggins<br>                                            <br /><hr />Envie de naviguer sur Internet sans laisser de trace? <a href='http://clk.atdmt.com/FRM/go/207186970/direct/01/' target='_new'>La solution avec Internet Explorer 8</a></body>
</html>