◷ Reading Time: 6 minutes
The sample project will show how to automate the library policies with regards to determining borrowing ability of a student.
In this example, we used pre defined policies to automate which is used to determine the library borrowing ability of a student.
Borrowing rights will be suspended if a student has:
- An overdue 2 day loan.
- A 7 day loan that is overdue by more than 3 days
- A 28 or 90 day loan that is overdue by more than 7 days
- A fine of $25.00 or more
Borrowers will be suspended at their library until overdue items are returned and fines paid.
If a student has a long overdue item, maximum fine exceed for an item and unpaid fines of over $25 , student will incur a sanction in the student system which may prevent getting access to results, and graduating.
Grace Period: If a student has a 7 day loan, or a 28 day loan item that has reached the autorenewal limit and is now overdue, library gives a grace period where student won’t be fined if they return the item. After the grace period has elapsed, if the item is still overdue student will be charged the full fine amount from the time the item became overdue.
Running the Sample
- Open the file Determine Borrowing Ability.xml
- Click on the Logic Run template.
- Click on any given template.
- Debug the sample by clicking on the debug button in the Logic Run Template window.
- You can click the ‘Next Step’ button to go step by step to follow the flow.
- Now you can see the output values in the ‘Parameters’ window.
The process contains the following steps to determine “Borrowing Ability of a student”
- Determine the loan details based on the loan period.
- Calculate overdue days
- Determine Overdue Status
- Calculate Fine
- Determine Borrowing Ability based on fine, overdue status and maximum fine exceed.
The project contains the following documents.
- DetermineLoanDetails.xml – Determines the Loan details based on loan period.
- Calculate Overdue Days.xml – Calculate overdue days based on grace period.
- Determine Borrowing Decision.xml – Based on fine, overdue status and whether the maximum fine exceed or not, borrowing ability will be determine along with other sanctions.
- Concept.xml – Allows to reuse the student details throughout the process.
- LoanOverdue.xml – Determines the loan overdue status.
- DetermineBorrowingAbility.xml – Overall flaw of the process.
The Flow Design
1. Decision Table to determine loan details.
This determine grace period, fine rate per day and maximum fine possible based on loan period for an item which student borrow.
2. Calculate Overdue days
This Decision Table calculate the overdue days.
3. Determine Overdue Status
In this Decision Graph determine the overdue status based on loan period.
4 Calculate Fines
In this decision, it calculate the library fine by adding previous fines if exists.
5 Determine Borrowing Ability
As the final step, based on the previous decisions, this decision table determine the student’s borrowing ability, access to results and ability to graduate.
Test cases are based on following test data. You can import excel file as a test data to automatically generate test cases.
Download the project
Use the attachment at the end of the page to download the sample project.