Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Requirements

Purpose: MARC Bibliographic records can be updated in a variety of ways - through an Import that updates it, or through quickMARC, or through MARCcat. Whenever/however an SRS MARC Bib record is updated, then the corresponding changes need to be made in the Instance fields that are controlled by the tenant's default map.

...

The FOLIO-supplied default MARC-Instance map: https://github.com/folio-org/mod-source-record-manager/blob/master/mod-source-record-manager-server/src/main/resources/rules/rules.json

Approach & Design

Endpoints:

MethodPathProvided permissionsRequestResponseDescriptionNotes
PUT/change-manager/parsedRecords/{id}change-manager.parsed-records.putcompatible parsed record204 UPDATED (compatible-parsed-record)Update parsed record{id} - parsed record id
GET/source-storage/records/{id}source-storage.records.getNA200 OK (compatible-record)Retrieve rcord by id{id} - record id
POST/source-storrage/snapshotssource-storage.snapshots.postcompatible snapshot200 OKCreate new snapshot







Step-by-step guide:

  1. Updated MARC-record sends to the "mod-source-record-manager" on the specific endpoint for updating MARC-records.: PUT /change-manager/parsedRecords/{id}
  2. "mod-source-record-manager" retrieves record by its id (using generationId-mechanism): GET /source-storage/records/{id}
  3. "mod-source-record-manager"  creates new snapshot: POST /source-storage/snapshots
  4. "mod-source-record-manager" updates creates this MARC-record in the "mod-source-record-storage" using generationId-mechanism .as new record: POST /source-storage/records
  5. "mod-source-record-manager" publishes new event with eventType: "QM_SRS_MARC_BIB_RECORD_UPDATED". Event payload contains updated MARC-record and "rules.json"-file.
  6. "mod-pubsub" receives this event and "mod-inventory" catches it as "subscriber" for this eventType.
  7. "mod-inventory" retrieves eventPayload and builds new Instance based on its data using "data-import-processing-core". After that, "mod-inventory" updates this instance.

...