[rules-users] Download CREDIT DEBIT example-

Aman boy18nj at gmail.com
Sat Oct 2 19:46:52 EDT 2010


Currently I am reading this drools expert documentation, I came across this
example-

Where  can I download this example?

 

rule "increase balance for credits"

when

  ap : AccountPeriod()

  acc : Account( $accountNo : accountNo )

  CashFlow( type == CREDIT,

    accountNo == $accountNo,

    date >= ap.start && <= ap.end,

    $amount : amount )

then

  acc.balance  += $amount;

end

 

 

rule "decrease balance for debits" 

when 

  ap : AccountPeriod() 

  acc : Account( $accountNo : accountNo ) 

  CashFlow( type == DEBIT, 

    accountNo == $accountNo,

    date >= ap.start && <= ap.end, 

    $amount : amount ) 

then 

  acc.balance -= $amount; 

end

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101002/0201f4e7/attachment.html 


More information about the rules-users mailing list