1. Home
  2. Sample Projects
  3. Borrowing Ability in a Library

Borrowing Ability in a Library

◷ Reading Time: 6 minutes

Introduction

The sample project will show how to automate the library policies with regards to determining borrowing ability of a student.

Scenario

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
first file to run1
  • Click on the Logic Run template.
  • Click on any given template.
Logic run
  • 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.
Parameter window

Process Steps

The process contains the following steps to determine “Borrowing Ability of a student”

  1. Determine the loan details based on the loan period.
  2. Calculate overdue days
  3. Determine Overdue Status
  4. Calculate Fine
  5. Determine Borrowing Ability based on fine, overdue status and maximum fine exceed.
Decision Graph for library fine

Project Description

The project contains the following documents.

Decision Table

  • 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.

Business Glossaries

  • Concept.xml – Allows to reuse the student details throughout the process.

Decision Graph

  • 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.

loan details DT

2. Calculate Overdue days

This Decision Table calculate the overdue days.

Calculate overdue days

3. Determine Overdue Status

In this Decision Graph determine the overdue status based on loan period.

Subgraph

4 Calculate Fines

In this decision, it calculate the library fine by adding previous fines if exists.

Calculate fine expression1

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.

Final DT for library

Test Cases

Test cases are based on following test data. You can import excel file as a test data to automatically generate test cases.

Test data for library

Download the project

Use the attachment at the end of the page to download the sample project.

Updated on March 6, 2023

Article Attachments

Was this article helpful?

Related Articles