Sequencing of Secure request logic

The diagram below shows the calls and interactions between modules while processing a secure request.

Note: the diagram is missing the work with the 3rd copy of circulation requests in the Central tenant.

Untitled-20241204-150710.png

@startuml
title Private Requests

actor "Secure Patron" as SP
actor "Authorized Staff" as AS

box "Congressional Tenant" #LightBlue
participant "Mediated Requests\nApp UI" as MRA_UI
participant "Mediated Requests\nApp back-end" as MRA_BE
participant "Circulation\nvia mod-circulation" as modCircCT
participant "DCB\nvia mod-dcb" as modDcbCT
end box

box "Central Tenant" #MintCream
participant "Common catalog\nvia mod_search" as modSearch
participant "Users\nvia mod_users" as modUsers
participant "ECS TLR\nvia mod_tlr" as modTlr
end box

box "Data Tenant" #Khaki
participant "DCB\nvia mod-dcb" as modDcbDT
participant "Circulation\nvia mod-circulation" as modCircDT
participant "Requests App\nvia ui-requests" as uiReqDT
participant "Check in App\nvia ui-checkin" as uiCheckinDT
end box

actor "Unauthorized Staff" as US

== 1 - Accepting a new request from the Secure Patron ==

SP -> AS: make a request\nusing phone, fax, email, or similar
AS -> SP: ok
AS -> MRA_UI: create a new request
note left MRA_UI: Secure Patron details
MRA_UI -> MRA_BE: create a new record\n(including database record)
MRA_BE -> MRA_UI: ok
MRA_UI -> AS: ok

== 2 - Searching for a suitable title using information from the Secure Patron ==

AS -> modSearch: search for a title in the common catalog
note left modSearch: information about requested title
modSearch -> AS: info about available titles

AS -> MRA_UI: open existing request\nand update it with info\nabout a title
MRA_UI -> MRA_BE: update the record
MRA_BE -> MRA_UI: ok
MRA_UI -> AS: ok

== 3 - Starting a circulation request ==
AS -> MRA_UI: create a request for a known title
MRA_UI -> MRA_BE: create a request for a known title
MRA_BE -> modUsers: create a fake proxy user
modUsers -> MRA_BE: fake proxy user details
MRA_BE -> MRA_BE: save fake proxy user details\nand its relation to the real Secure Patron
MRA_BE -> modTlr: place an ECS TLR request\nfor the known title\nand for the fake proxy user
modTlr -> MRA_BE: ok
MRA_BE -> MRA_UI: ok
MRA_UI -> AS: ok

== 4 - Doing cross-tenant circulation ==
note left modTlr: THE SIMPLIFIED ECS TLR WORKFLOW IS DESCRIBED BELOW. REFER TO ECS TLR WORKFLOW FOR ALL THE DETAILS
modTlr -> modDcbCT: sync
modDcbCT -> modCircCT: sync
modTlr -> modDcbDT: sync
modDcbDT -> modCircDT: sync
note left modTlr: ECS TLR supports the circulation process\nfrom Data Tenant (Landing side) to Congressional Tenant (Borrowing side)

note over uiReqDT: fake proxy patron details are used here
US -> uiReqDT: view the request's information
US -> uiCheckinDT: check-in

== 5 - Checking out ==
note right MRA_UI: real Secure Patron details are used here
AS -> MRA_UI: view the request's information
AS -> MRA_UI: check-in
AS -> MRA_UI: check-out
MRA_UI -> MRA_BE: communication with Mediated Requests APp back-end
MRA_UI -> modCircCT: communication with Circulation back-end
AS -> SP: the item is checked out and sent to the Secure Patron
activate SP
note right SP: using the item
deactivate SP
SP -> AS: returning the item

== 6 - Checking in and transition back ==
AS -> MRA_UI: check-in
MRA_UI -> MRA_BE: check-in
MRA_UI -> modCircCT: check-in

modTlr -> modDcbCT: sync
modDcbCT -> modCircCT: sync
modTlr -> modDcbDT: sync
modDcbDT -> modCircDT: sync
note left modTlr: ECS TLR supports the circulation process\nfrom Congressional Tenant (Borrowing side) to Data Tenant (Landing side)

note over MRA_UI, uiCheckinDT: finally, all the requests and loans are to be closed

@enduml