<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>

<META content="MSHTML 6.00.2900.3086" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=071235220-12062007><FONT face=Arial 
color=#0000ff 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><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;
</DIV>
<DIV dir=ltr align=left><SPAN class=071235220-12062007><FONT face=Arial 
color=#0000ff size=2>//mydate within last 30 days</FONT></SPAN>
</DIV>
<DIV dir=ltr align=left><SPAN class=071235220-12062007><FONT face=Arial 
color=#0000ff size=2>mydate + 30 &gt; getdate()</FONT></SPAN>
</DIV>
<DIV dir=ltr align=left><SPAN class=071235220-12062007><FONT face=Arial 
color=#0000ff size=2>then dosomething()</FONT></SPAN>
</DIV>
<DIV dir=ltr align=left><SPAN class=071235220-12062007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;
</DIV>
<DIV dir=ltr align=left><SPAN class=071235220-12062007><FONT face=Arial 
color=#0000ff 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><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;
</DIV>
<DIV dir=ltr align=left><SPAN class=071235220-12062007><FONT face=Arial 
color=#0000ff 
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 face=Arial color=#0000ff 
size=2>-----------------------------------------------------------------------------------------------</FONT></SPAN>
</DIV>
<DIV><SPAN class=071235220-12062007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;
</DIV>
<DIV><SPAN class=071235220-12062007><FONT face=Arial color=#0000ff 
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><FONT face=Arial size=2></FONT>&nbsp;
</DIV>
<DIV>&nbsp;
</DIV><BR>

<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>&#160;&#160;


<FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org 
[mailto:rules-users-bounces@lists.jboss.org] <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>
<DIV></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 width="90%" SIZE=4>&#160;&#160;


_______________________________________________
rules-dev mailing list
<A class=moz-txt-link-abbreviated href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</A>
<A 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>
</BODY></HTML>