<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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" 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></tbody></table><br>      <!--3--><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"> Click here</a>._______________________________________________<br>rules-users mailing list<br><a href="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></div></body></html>