<html><body bgcolor="#FFFFFF"><div>Hi Baskaran,</div><div>You needs configure the knowledge base wirh STREAM processing mode. Sliding window feature only works on stream processing mode, default is CLOUD.</div><div><br></div><div>Check the documentation</div><div><br></div><div>Lucaz</div><div><br>On 12/11/2009, at 06:55, bas karan &lt;<a href="mailto:ibasas@yahoo.co.in">ibasas@yahoo.co.in</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div><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;<a href="mailto:lucazamador@gmail.com">lucazamador@gmail.com</a>&gt;<br><b><span style="FONT-WEIGHT: bold">To:</span></b> Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&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>
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"><a href="mailto:lucazamador@gmail.com">lucazamador@gmail.com</a></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"><a href="mailto:lucazamador@gmail.com">lucazamador@gmail.com</a></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"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></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"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" rel="nofollow"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></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"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" rel="nofollow"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></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"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br></div>
</div></div><!-- cg6.c50.mail.in.yahoo.com compressed/chunked Thu Nov  5 22:15:01 PST 2009 --></div><br>



      <!--1--><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">See your Yahoo! Homepage</a>.</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>rules-users mailing list</span><br><span><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></span><br></div></blockquote></body></html>