<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><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></table><br>
      <!--3--><hr size=1></hr> Try the new Yahoo! India Homepage. <a href="http://in.rd.yahoo.com/tagline_metro_1/*http://in.yahoo.com/trynew" target="_blank"> Click here</a>.