Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

appendix 1: UML source

Ben Wong edited this page Nov 29, 2018 · 1 revision

For use in https://www.websequencediagrams.com/

title Repairs Management Work Order Page

Browser->Webapp: /work_orders/:reference

Webapp->Repairs Api: get_work_order
Repairs Api->Data Warehouse:
Repairs Api->UH DB:
Webapp->Repairs Api: get_property
Repairs Api->UH DB:

Webapp->Browser: "basic" page

alt parallel request for extra work order data

Browser->Webapp: /api/work_orders/:reference/description
Webapp->Repairs Api: get_repair_request
Repairs Api->Data Warehouse:
Repairs Api->UH DB:
Webapp->Repairs Api: get_work_order_appointments_latest
Repairs Api->Data Warehouse:
Repairs Api->UH DB:
Repairs Api->DRS:
Webapp->Browser: Updates to "basic" page

else parallel request for repairs history

Browser->Webapp: /api/properties/:reference/repairs_history
Webapp->Repairs Api: get_work_order
Repairs Api->Data Warehouse:
Repairs Api->UH DB:
Webapp->Repairs Api: get_property
Repairs Api->Data Warehouse:
Webapp->Repairs Api: get_property_hierarchy
Repairs Api->Data Warehouse:
Webapp->Repairs Api: get_work_orders_by_property
Repairs Api->Data Warehouse:
Repairs Api->UH DB:
Webapp->Browser: Repairs history tab

else parallel request for notes and appointments

Browser->Webapp: /api/work_orders/:reference/notes_and_appointments
Webapp->Repairs Api: get_work_order
Repairs Api->Data Warehouse:
Repairs Api->UH DB:
Webapp->Repairs Api: get_work_order_notes
Repairs Api->UH DB:
Webapp->Repairs Api: get_work_order_appointments
Repairs Api->Data Warehouse:
Repairs Api->UH DB:
Repairs Api->DRS:
Webapp->Browser: Notes and appointments tab

else parallel request for possibly related work orders

Browser->Webapp: /api/work_orders/:reference/possibly_related_work_orders
Webapp->Repairs Api: get_work_order
Repairs Api->Data Warehouse:
Repairs Api->UH DB:
Webapp->Repairs Api: get_property
Repairs Api->Data Warehouse:
Webapp->Repairs Api: get_property_block_work_orders_by_trade
Repairs Api->Data Warehouse:
Repairs Api->UH DB:
Webapp->Repairs Api: get_properties_by_references
Repairs Api->Data Warehouse:
Webapp->Browser: Possibly Related Tab

else parallel request for related work orders

Browser->Webapp: /api/work_orders/:reference/related_work_orders
Webapp->Neo4j: Graph::WorkOrder#related
Webapp->Repairs Api: get_work_orders_by_references
Repairs Api->Data Warehouse:
Repairs Api->UH DB:
Webapp->Repairs Api: get_properties_by_references
Repairs Api->Data Warehouse:
Webapp->Repairs Api: get_work_order
Repairs Api->Data Warehouse:
Repairs Api->UH DB:
Webapp->Repairs Api: get_property
Repairs Api->Data Warehouse:
Webapp->Browser: Related work orders tab

else parallel request for documents

Browser->Webapp: /api/work_orders/:reference/documents
Webapp->Repairs Api: get_work_order
Repairs Api->Data Warehouse:
Repairs Api->UH DB:
Webapp->Repairs Api: get_work_order_reports
Repairs Api->Shared Filesystem:
Webapp->Browser: Documents tab

end
title Repairs Management Feed

Heroku Scheduler->WorkOrderFeedJob: every 5 minutes
Heroku Scheduler->NotesFeedJob: every 5 minutes

WorkOrderFeedJob->Repairs API: get work order feed
WorkOrderFeedJob->WorkOrderFeedJob: extract cited work order references
note over WorkOrderFeedJob:
Parse work order references immediately
to avoid storing any sensitive text
end note

WorkOrderFeedJob->Neo4j: create work order
WorkOrderFeedJob->Neo4j: update last imported reference
WorkOrderFeedJob->Neo4j: verify cited work order references are valid
WorkOrderFeedJob->Neo4j: create citation

NotesFeedJob->Repairs API: get notes feed
NotesFeedJob->NotesFeedJob: extract cited work order references
note over NotesFeedJob:
Parse work order references immediately
to avoid storing any sensitive text
end note

NotesFeedJob->RelatedWorkOrderJob: enqueue

RelatedWorkOrderJob->Repairs API: find work order
note over RelatedWorkOrderJob:
It is possible that the notes feed may
get ahead of the work order feed and a
note may refer to a work order not yet
created and we will have grab data from
the api to create it.
end note
RelatedWorkOrderJob->Neo4j: create work order
RelatedWorkOrderJob->Neo4j: create note
RelatedWorkOrderJob->Repairs API: verify cited work order reference is valid
RelatedWorkOrderJob->Neo4j: create work order
note over RelatedWorkOrderJob:
We need to check any cited work order
references are valid, references lower
than the ones we have already imported
can be checked by querying the Neo4j.
Those that are higher must ve verified
by the Repairs API and created in Neo4j
if missing.
end note
RelatedWorkOrderJob->Neo4j: create citation
Clone this wiki locally