<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Only modified for this rule? Not entirely sure what you mean, what is
wrong with a return value constraint?<br>
<br>
We have no special date constructs beyond the standard date comparators.<br>
<br>
Mark<br>
Michael Rhoden wrote:
<blockquote
 cite="mid:L2F427143F14349abACB6FE769DFAE096.1181682076.skat.bna.franklinamerican.com@MHS"
 type="cite">
  <meta content="MSHTML 6.00.2900.3086" name="GENERATOR">
  <div dir="ltr" align="left"><span class="071235220-12062007"><font
 color="#0000ff" face="Arial" size="2">I have a question related to
this. Is there a way within a rule that you can add 30 days to a date...</font></span>
  </div>
  <div dir="ltr" align="left"><span class="071235220-12062007"></span>&nbsp;
  </div>
  <div dir="ltr" align="left"><span class="071235220-12062007"><font
 color="#0000ff" face="Arial" size="2">//mydate within last 30 days</font></span>
  </div>
  <div dir="ltr" align="left"><span class="071235220-12062007"><font
 color="#0000ff" face="Arial" size="2">mydate + 30 &gt; getdate()</font></span>
  </div>
  <div dir="ltr" align="left"><span class="071235220-12062007"><font
 color="#0000ff" face="Arial" size="2">then dosomething()</font></span>
  </div>
  <div dir="ltr" align="left"><span class="071235220-12062007"></span>&nbsp;
  </div>
  <div dir="ltr" align="left"><span class="071235220-12062007"><font
 color="#0000ff" face="Arial" size="2">I would only want mydate
modified for this rule only not re-asserted on the stack with a new
date. Also if someone could point me in the direction of some good info
on dealing with dates in rules, love to see more examples.</font></span>
  </div>
  <div dir="ltr" align="left"><span class="071235220-12062007"></span>&nbsp;
  </div>
  <div dir="ltr" align="left"><span class="071235220-12062007"><font
 color="#0000ff" face="Arial" size="2">-----------------------------------------------------------------------------------------------</font></span>
  </div>
  <div dir="ltr" align="left">-MVEL has sugar to do: modify ( person )
{ age += 1, location = "london" }, what actually happens here is it
first calls modifyRetract then applies the setters and then calles
modifyAssert.
  </div>
  <div><span class="071235220-12062007"><font color="#0000ff"
 face="Arial" size="2">-----------------------------------------------------------------------------------------------</font></span>
  </div>
  <div><span class="071235220-12062007"></span>&nbsp;
  </div>
  <div><span class="071235220-12062007"><font color="#0000ff"
 face="Arial" size="2">Thanks,</font></span>
  </div>
  <div><font face="Arial"><font size="2"><span
 class="071235220-12062007">-</span>Michael</font></font>
  </div>
  <div>&nbsp;
  </div>
  <div><font face="Arial" size="2"><br>
  </font>&nbsp;
  </div>
  <div align="left">&nbsp;
  </div>
  <div>&nbsp;
  </div>
  <br>
  <div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
  <hr tabindex="-1">&nbsp;&nbsp;
  <font face="Tahoma" size="2"><b>From:</b>
<a class="moz-txt-link-abbreviated" href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>
[<a class="moz-txt-link-freetext" href="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</a>] <b>On Behalf Of </b>Mark
Proctor<br>
  <b>Sent:</b> Tuesday, June 12, 2007 3:39 PM<br>
  <b>To:</b> Rules Dev List<br>
  <b>Cc:</b> Rules Users List<br>
  <b>Subject:</b> [rules-users] change "assert" to "insert"+ other
changes<br>
  </font><br>
  </div>
Ok, I'm now doing these changes. <br>
  <br>
  <br>
Mark Proctor wrote:
  <blockquote cite="mid:4664DDB7.9090507@codehaus.org" type="cite">I've
had no further feedback on this, so I'm going to make this change as
part of the next milestone release (this week) - these changes are
considerable.<br>
    <br>
assert will change to insert<br>
-avoid the constant keyword collision with "assert", most languages are
seem to support this now<br>
-will change in both the drl and working memory api<br>
    <br>
modify to become update<br>
-instead of workingMemory.modify(FactHandle, Object) it will be
workingMemory.update(FactHandle, Object), will change modify to update
in drl.<br>
-this method is now only used for ShadowFact objects, it's&nbsp; a method to
let the engine know that an external object has been updated and to
update it's internal cache. and reprocess.<br>
-avoid keyword collision in MVEL which has nice "modify" sugar now<br>
    <br>
insertObject, retractObject and updateObject to beome insert, retract
and update<br>
-the Object part seems superflous, might as well remove it, especially
as we start to support none Object fact types<br>
-drl and working memory api will now use the same method names.<br>
    <br>
added new WorkingMemory modifyRetract and modifyAssert methods<br>
-allows for non shadow fact objects.<br>
-When not using shadow facts (although will ofcourse work with shadow
facts) you cannot call 'update', or what use to be called 'modify',
because we need to know the "old" value of fields so we can retract the
from the workign memory. The only safe way is to first retract the
object and then assert it. However with the existing api this adds
extra work and results in new fact handle. modifyRetract and
modifyAssert can now be used together to "simulate" a modify on a none
shadow fact object in two parts. First call modifyRetract, then change
your field values, then call modifyAssert.<br>
-MVEL has sugar to do: modify ( person ) { age += 1, location =
"london" }, what actually happens here is it first calls modifyRetract
then applies the setters and then calles modifyAssert.<br>
    <br>
Mark<br>
    <br>
Greg Barton wrote:
    <blockquote cite="mid:327365.7244.qm@web81506.mail.mud.yahoo.com"
 type="cite">
      <pre wrap="">I think it's a good idea, so ya, change to "insert"

GreG

--- Mark Proctor <a class="moz-txt-link-rfc2396E"
 href="mailto:mproctor@codehaus.org" moz-do-not-send="true">&lt;mproctor@codehaus.org&gt;</a> wrote:

  
      </pre>
      <blockquote type="cite">
        <pre wrap="">We have been getting querries with regards to jdk
assert collision and 
jboss rules assert, for this reason we are thinking
of changing it to 
insert for 4.0. Further to that its causing language
integrations issues 
for us as we expand pluggeable dialects. For this
reason we are thinking 
of chaning assert to insert, this would be an api
change and a language 
level change. I'd thought I'd throw this out to the
community before we 
do it. This of course breaks backwards
compatability.

Mark
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated"
 href="mailto:rules-dev@lists.jboss.org" moz-do-not-send="true">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext"
 href="https://lists.jboss.org/mailman/listinfo/rules-dev"
 moz-do-not-send="true">https://lists.jboss.org/mailman/listinfo/rules-dev</a>

    
        </pre>
      </blockquote>
      <pre wrap=""><!---->


       
____________________________________________________________________________________Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
<a class="moz-txt-link-freetext"
 href="http://new.toolbar.yahoo.com/toolbar/features/norton/index.php"
 moz-do-not-send="true">http://new.toolbar.yahoo.com/toolbar/features/norton/index.php</a>
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated"
 href="mailto:rules-dev@lists.jboss.org" moz-do-not-send="true">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext"
 href="https://lists.jboss.org/mailman/listinfo/rules-dev"
 moz-do-not-send="true">https://lists.jboss.org/mailman/listinfo/rules-dev</a>

  
      </pre>
    </blockquote>
    <br>
    <pre wrap=""><hr size="4" width="90%">&nbsp;&nbsp;


_______________________________________________
rules-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
  
    </pre>
  </blockquote>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </pre>
</blockquote>
<br>
</body>
</html>