<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Hi, </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Drools sliding window is not working. I have given my excerpt from my coding, DRL is,</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; declare&nbsp;-----<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@role( event )</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;@timestamp( timestamp )</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; end</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rule "Program- Multiple Trans in multiple calendar days"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;when&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;---- over window:length(2m) from entry-point TransactionStream&nbsp;<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;then&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; end</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Java,</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I am doing the following before inserting and firing.</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SessionPseudoClock.advanceTime(1,TimeUnit.SECONDS);</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Am I really missing anything here? Could you please help me in this or if you have woking sample program. Please give me that</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks</DIV>
<DIV>Baskaran S</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT face=Tahoma size=2>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Lucas Amador &lt;lucazamador@gmail.com&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Rules Users List &lt;rules-users@lists.jboss.org&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wed, 11 November, 2009 7:10:18 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [rules-users] Reg: Writing complex rules in Grided editor<BR></FONT><BR>
<META http-equiv=x-dns-prefetch-control content=off>Hi Baskaran,
<DIV>you can use drools-pipeline module with the Smooks transformers to do that!</DIV>
<DIV><BR></DIV>
<DIV>lucaz</DIV>
<DIV><BR>
<DIV>
<DIV>El 11/11/2009, a las 01:23, bas karan escribió:</DIV>
<DIV><BR></DIV><BR class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>Hi Lucas,</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks for&nbsp; your replay. And one more question I have is,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Can we have access to TimesTen or any other in-memory databases so that no need to load WorkingMemoryEntryPoints with all the objects?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Is there any way to load objects into WorkingMemoryEntryPoints taken from database?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks in advance</DIV>
<DIV>Baskaran S</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>--- On <B>Tue, 10/11/09, Lucas Amador <I>&lt;<A href="mailto:lucazamador@gmail.com" target=_blank rel=nofollow ymailto="mailto:lucazamador@gmail.com">lucazamador@gmail.com</A>&gt;</I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><BR>From: Lucas Amador &lt;<A href="mailto:lucazamador@gmail.com" target=_blank rel=nofollow ymailto="mailto:lucazamador@gmail.com">lucazamador@gmail.com</A>&gt;<BR>Subject: Re: [rules-users] Reg: Writing complex rules in Grided editor<BR>To: "Rules Users List" &lt;<A href="mailto:rules-users@lists.jboss.org" target=_blank rel=nofollow ymailto="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A>&gt;<BR>Date: Tuesday, 10 November, 2009, 6:34 PM<BR><BR>
<DIV id=yiv863146683>Hi,&nbsp; 
<DIV><BR></DIV>
<DIV>the best way is use DSL because isn't possible create "complex" rules with the guided editor 
<DIV><BR>
<DIV>
<DIV>El 10/11/2009, a las 06:33, bas karan escribió:</DIV><BR class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I am new to Drools rules. Can any one of you tell me how can we write complex rules like below using Grided editor.</DIV>
<DIV>&nbsp;</DIV>
<DIV>rule sequenceOfIncreasingWithdrawals<BR>&nbsp; when<BR>&nbsp;&nbsp;&nbsp; $account:Account($number : number)<BR>&nbsp;&nbsp;&nbsp; $t1:TransactionCreatedEvent(fromAccountNumber == $number)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from entry-point TransactionStream&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; $t2:TransactionCreatedEvent(amount &gt; $t1.amount, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fromAccountNumber == $number, this after[0, 3m] $t1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from entry-point TransactionStream<BR>&nbsp;&nbsp;&nbsp; not (TransactionCreatedEvent(fromAccountNumber == $number,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this after $t1, this before $t2 ) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from entry-point TransactionStream)<BR>&nbsp;&nbsp;&nbsp; $t3:TransactionCreatedEvent(amount &gt; $t2.amount, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fromAccountNumber == $number, this after[0, 3m] $t2 )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from entry-point
 TransactionStream<BR>&nbsp;&nbsp;&nbsp; not (TransactionCreatedEvent(fromAccountNumber == $number,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this after $t2, this before $t3 ) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from entry-point TransactionStream)<BR>&nbsp;&nbsp;&nbsp; $ai : AccountInfo(number == $number, eval($t1.amount.add(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $t2.amount).add($t3.amount).compareTo(BigDecimal.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; valueOf(0.90).multiply(averageBalance)) &gt; 0))<BR>&nbsp; then<BR>&nbsp;&nbsp;&nbsp; insert(new SuspiciousAccount($number, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SuspiciousAccountSeverity.MAJOR));<BR>&nbsp;&nbsp;&nbsp; insert(new SuspiciousTransaction($t1.transactionUuid, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SuspiciousTransactionSeverity.MAJOR));<BR>&nbsp;&nbsp;&nbsp; insert(new SuspiciousTransaction($t2.transactionUuid, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SuspiciousTransactionSeverity.MAJOR));<BR>&nbsp;&nbsp;&nbsp; insert(new
 SuspiciousTransaction($t3.transactionUuid, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SuspiciousTransactionSeverity.MAJOR));<BR>end</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks</DIV>
<DIV>Baskaran S</DIV></TD></TR></TBODY></TABLE><BR>
<HR SIZE=1>
Try the new Yahoo! India Homepage. <A href="http://in.rd.yahoo.com/tagline_metro_1/*http://in.yahoo.com/trynew" target=_blank rel=nofollow>Click here</A>._______________________________________________<BR>rules-users mailing list<BR><A href="http://in.mc79.mail.yahoo.com/mc/compose?to=rules-users@lists.jboss.org" target=_blank rel=nofollow>rules-users@lists.jboss.org</A><BR><A href="https://lists.jboss.org/mailman/listinfo/rules-users" target=_blank rel=nofollow>https://lists.jboss.org/mailman/listinfo/rules-users</A><BR></BLOCKQUOTE></DIV><BR></DIV></DIV></DIV><BR>-----Inline Attachment Follows-----<BR><BR>
<DIV class=plainMail>_______________________________________________<BR>rules-users mailing list<BR><A href="http://in.mc79.mail.yahoo.com/mc/compose?to=rules-users@lists.jboss.org" target=_blank rel=nofollow>rules-users@lists.jboss.org</A><BR><A href="https://lists.jboss.org/mailman/listinfo/rules-users" target=_blank rel=nofollow>https://lists.jboss.org/mailman/listinfo/rules-users</A><BR></DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE><BR>
<HR SIZE=1>
The INTERNET now has a personality. YOURS! <A href="http://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/" target=_blank rel=nofollow>See your Yahoo! Homepage</A>._______________________________________________<BR>rules-users mailing list<BR><A href="mailto:rules-users@lists.jboss.org" target=_blank rel=nofollow ymailto="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A><BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR></BLOCKQUOTE></DIV><BR></DIV>
<META http-equiv=x-dns-prefetch-control content=on></DIV></DIV><!-- cg6.c50.mail.in.yahoo.com compressed/chunked Thu Nov  5 22:15:01 PST 2009 --></div><br>



      <!--1--><hr size=1></hr> 
The INTERNET now has a personality. YOURS! <a href="http://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/" target="_blank">See your Yahoo! Homepage</a>.</body></html>