...
- The mod-inventory module consumes a "DI_INVENTORY_INSTANCE_MATCHED" message from Kafka with an incoming MARC record and matched instance that should be updated. The processing of such messages is dispatched to the ReplaceInstanceEventHandler event handler.
- Obtaining existing MARC record that related to the instance by performing "GET /source-storage/records/{instanceId}/formatted?idType=INSTANCE" call for record preparation before instance mapping invocation.
Record preparation means updating existing record fields by fields from the incoming record according to fields protection logic described on the MARC field protections page. Field protection rules/settings are already available for the handler and can be retrieved from MappingParameters (MappingParameters#getMarcFieldProtectionSettings()
). After that prepared record is used as a source for instance mapping.
Logic to update the MARC record fields can be implemented as a util method and extracted to the data-import-processing-core library to be reused by other event handlers if it would be necessary. - An instance update result (mapped instance) is sent to mod-inventory-storage by calling the corresponding REST endpoint.
- A message with instance update result is sent to Kafka and then it is consumed by mod-source-record-storage to update parsed content of related MARC record.
...
- for data-import-processing-core library a util method should be added that takes incoming, existing record, and field protection settings and performs existing record update with incoming record fields according to protection fields logic
Jira Legacy server System JiraJIRA columnIds issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 01505d01-b853-3c2e-90f1-ee9b165564fc key MODDICORE-265 - for mod-inventory module it is necessary to add an additional call to mod-source-record-storage to obtain existing MARC record and perform record preparation using the method mentioned in the previous bullet point.
Populate a payload of instance update result message with prepared record to be saved in the mod-source-record-storageJira Legacy server System JiraJIRA columnIds issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 01505d01-b853-3c2e-90f1-ee9b165564fc key MODINV-686
...