<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hi,</DIV>
<DIV> </DIV>
<DIV> 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> </DIV>
<DIV>rule sequenceOfIncreasingWithdrawals<BR> when<BR> $account:Account($number : number)<BR> $t1:TransactionCreatedEvent(fromAccountNumber == $number)<BR> from entry-point TransactionStream <BR> $t2:TransactionCreatedEvent(amount > $t1.amount, <BR> fromAccountNumber == $number, this after[0, 3m] $t1)<BR> from entry-point TransactionStream<BR> not (TransactionCreatedEvent(fromAccountNumber == $number,<BR> this after $t1, this before $t2 ) <BR> from entry-point TransactionStream)<BR> $t3:TransactionCreatedEvent(amount > $t2.amount, <BR> fromAccountNumber == $number, this after[0, 3m] $t2 )<BR> from entry-point
TransactionStream<BR> not (TransactionCreatedEvent(fromAccountNumber == $number,<BR> this after $t2, this before $t3 ) <BR> from entry-point TransactionStream)<BR> $ai : AccountInfo(number == $number, eval($t1.amount.add(<BR> $t2.amount).add($t3.amount).compareTo(BigDecimal.<BR> valueOf(0.90).multiply(averageBalance)) > 0))<BR> then<BR> insert(new SuspiciousAccount($number, <BR> SuspiciousAccountSeverity.MAJOR));<BR> insert(new SuspiciousTransaction($t1.transactionUuid, <BR> SuspiciousTransactionSeverity.MAJOR));<BR> insert(new SuspiciousTransaction($t2.transactionUuid, <BR> SuspiciousTransactionSeverity.MAJOR));<BR> insert(new
SuspiciousTransaction($t3.transactionUuid, <BR> SuspiciousTransactionSeverity.MAJOR));<BR>end</DIV>
<DIV> </DIV>
<DIV> </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>.