[<10>]
====== "Renew Loan" operation ======
To renew a loan, users would need to navigate to the loan that is to be renewed and then click on the "Renew" button. Users can navigate to the loan either from the form of a member that borrowed the item (the form of the member will list the loans of the member because the ''Member'' object has the ''Loans'' reference attribute shown on the form) or from the form of the item (which also has a list of loans for the item).
To renew a loan the system would need to increment the ''RenewalCount'' attribute of the ''Loan'' object and the rest will be taken care by the [[docs:6000_case_study:0400_configuration:0600_business_rules:0300_loan_object|business rules of the ''Loan'' object]]. In order to do this we would need to define the process called ''RenewLoan'' that requires the ''Loan'' object as its input and which has the single action:
INCREASE Loan.RenewalCount BY 1
In fact, we will also add another action to the process that will report to the user the date that the loan has been extended to(( If renewal attempt fails the corresponding validation rules of the Loan object would issue the ''[[a_f:a:report_error|REPORT ERROR]]'' action which would abort the execution of the process and the system would never execute the ''[[a_f:a:display_message|DISPLAY MESSAGE]]'' action )):
DISPLAY MESSAGE 'Loan has been extended until <>'
We configure this process in the same fashion as we configured the [[docs:6000_case_study:0400_configuration:0700_operations:0900_borrow_items|''BorrowItem'' process]]. //**AwareIM**// will also automatically define the operation to invoke the process from the form of the ''Loan'' object.