┌─┐ ║"│ └┬┘ ┌┼┐ │ ┌───────────────┐ ┌───────┐ ┌───────┐ ┌─────────────┐ ┌─────────────────────┐ ┌┴┐ │mod-data-import│ │mod-srm│ │mod-srs│ │mod-inventory│ │mod-inventory-storage│ User └───────┬───────┘ └───┬───┘ └───┬───┘ └──────┬──────┘ └──────────┬──────────┘ │ [1] create job definition (profile, type) ┌┴┐ │ │ │ │──────────────────────────────────────────────────────────────────────────────────>│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ────┐ │ │ │ │ │ │ │ │ [2] create job │ │ │ │ │ │ │ <───┘ │ │ │ │ │ └┬┘ │ │ │ │ │ [3] jobId │ │ │ │ │<─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─│ │ │ │ │ │ │ │ │ │ [4] upload MARC file and jobId ┌┴┐ │ │ │ │ │────────────────────────────> │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ────┐ │ │ │ │ │ │ │ │ [5] split to chunks, store in memory │ │ │ │ │ │ │ <───┘ │ │ │ │ │ │ │ │ │ │ │ │ │ │ [6] export chunks to <>│ │ │ │ │ │ │ ──────────────────────────────────────────────────> │ │ │ │ └┬┘ │ │ │ │ │ [7] │ ┌┴┐ │ │ │ │<─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ────┐ │ │ │ │ │ │ │ │ [8] start job progress │ │ │ │ │ │ │ <───┘ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ────┐ │ │ │ │ │ │ │ │ [9] validate records (stored records are also persisted) │ │ │ │ │ │ │ <───┘ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ────┐ │ │ │ │ │ │ │ │ [10] generate ID for Inventory record and set to '999 ff i' field │ │ │ │ │ │ │ <───┘ │ │ │ │ │ └┬┘ │ │ │ │ │ │ [11] <> ┌┴┐ │ │ │ │ │ ──────────────────────────────────────────────────────────────────────────>│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ────┐ │ │ │ │ │ │ │ │ [12] match the existing records by matchedId │ │ │ │ │ │ │ <───┘ calculate 'generation' │ │ │ │ │ │ │ persist to database │ │ │ │ │ │ │ │ │ │ │ │ └┬┘ │ │ │ │ ┌┴┐ [13] <> │ │ │ │ │ │ │ <──────────────────────────────────────────────────────────────────────────│ │ │ │ │ │ │ │ │ │ │ │ │ │ ────┐ │ │ │ │ │ │ │ │ [14] create JSON payload (profile, parsed MARC, mapping parameters) │ │ │ │ │ │ │ <───┘ │ │ │ │ │ └┬┘ │ │ │ │ │ │ [15] <> ┌┴┐ │ │ │ │ ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────>│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ────┐ │ │ │ │ │ │ │ │ [16] AuthorityLoader loads Folio record │ │ │ │ │ │ │ <───┘ that matches criteria from Match profile │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╔══════╤══════╪═════════════════════════════════════════════════════════════════════════════╪═════════════════════════════════════════════════════╪═╪═════════════════════════════════════════════════════════════╪═════════════════════════════════════════════════╗ │ │ ║ ALT │ Matching Failed │ │ │ │ ║ │ │ ╟──────┘ │ │ │ │ │ ║ │ │ ║ ┌┴┐ [17] <> │ │ │ ║ │ │ ║ │ │ <────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────│ │ │ ║ │ │ ║ │ │ │ │ │ │ ║ │ │ ║ │ │ │ │ │ │ ║ │ │ ║ │ │ ────┐ │ │ │ │ ║ │ │ ║ │ │ │ [18] update Error Log │ │ │ │ ║ │ │ ╠════════════╪═╪════════════════════════════════════════════════════════════════════════════╪═════════════════════════════════════════════════════╪═╪═════════════════════════════════════════════════════════════╪═════════════════════════════════════════════════╣ │ │ ║ │ │ │ │ │ │ ║ │ │ ║ │ │ │ │ │ ────┐ │ ║ │ │ ║ │ │ │ │ │ │ [19] <> │ ║ │ │ ║ │ │ │ │ │ <───┘ │ ║ │ │ ║ │ │ │ │ │ │ ║ │ │ ║ │ │ │ │ │[20] UpdateAuthorityEventHandler generates FOLIO new record ┌┴┐ ║ │ │ ║ │ │ │ │ │PUT request to update the existing FOLIO record │ │ ║ │ │ ║ │ │ │ │ │ ─────────────────────────────────────────────────────────> │ │ ║ │ │ ║ │ │ │ │ │ │ │ ║ │ │ ║ │ │ │ │ │ │ │ ────┐ ║ │ │ ║ │ │ │ │ │ │ │ │ [21] Updates FOLIO record in database ║ │ │ ║ │ │ │ │ │ │ │ <───┘ ║ │ │ ║ │ │ │ │ │ └┬┘ ║ │ │ ║ │ │ │ │ │ [22] Response status │ ║ │ │ ║ │ │ │ │ │ <─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─│ ║ │ │ ║ │ │ │ │ │ │ ║ │ │ ║ │ │ [23] <> or <> │ │ │ ║ │ │ ║ │ │ <────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────│ │ │ ║ │ │ ╚════════════╪═╪════════════════════════════════════════════════════════════════════════════╪═════════════════════════════════════════════════════╪═╪═════════════════════════════════════════════════════════════╪═════════════════════════════════════════════════╝ User ┌───────┴───────┐ ┌──│ │──┐ ┌───┴───┐ ┌─────└┬┘─────┐ ┌──────────┴──────────┐ ┌─┐ │mod-data-import│ │mo│ │rm│ │mod-srs│ │mod-inventory│ │mod-inventory-storage│ ║"│ └───────────────┘ └──│ │──┘ └───────┘ └─────────────┘ └─────────────────────┘ └┬┘ │ │ ┌┼┐ │ │ │ │ │ ┌┴┐ │ │ └┬┘