Send an 'Instance creation' message to mod-inventory
Description
Environment
Potential Workaround
Attachments
Checklist
hideActivity

Tetiana KovalchukJune 27, 2024 at 12:25 PM
Tested on qld env
Build version: #488
Test cases and evidences attached.

Pavel BobylevJune 26, 2024 at 9:41 AMEdited
HI , have checked points you’ve posted earlier:
Language. In case there is no language we send spaces in 008 field positions 35-37, which is expected. Then Inventory / data-import mapping engine converts it to first language among languages list. We could consider it as a bug on data-import mapping engine side, but for them, I guess, it’s probably not a problem as language is always presented in reality.
Classification LC = Library of congress classification, sounds logical. Nothing to worry about as for me.
Index title is Inventory specific field with some special logic described in the mapping rules here: marc_bib_rules.json. Most probably we don’t have to check mapping rules and result, it’s data-import mapping engine responsibility.
System control number. There is actually our LD resource ID with ‘(ld)’ prefix, as it was required in design mentioned in MODINV-986 kb page . So it is expected I suppose. But probably we want another (or even new) ID type to be used here.
Resource (content) type. It’s forced in marc_bib_rules.json to ignore repeated fields here, taking first one only. So it’s currently expected behavior of data-import mapping engine.
Only one resource title - yes, it’s expected according to
The statements above is only my understanding, and only point 6 is proved. So let’s ask to double check points 1-5.

Tetiana KovalchukJune 25, 2024 at 8:43 AMEdited
Hi , can you please look at the scenario when language is not indicated while resource creation in LDE however it is set with a first value in Inventory? Thanks.
Classification is set as LC when ‘Library of congress classification’ selected (as far as I understand this is expected according to Excel file)
Truncated value is being set into “Index title” field
System control number is auto-added
“Content type” does not show repeating values in Inventory
Resource title shows one value (is it expected?)
Details
Assignee
Doug LoynesDoug LoynesReporter
Pavel BobylevPavel BobylevLabels
Priority
TBDStory Points
1Sprint
NoneDevelopment Team
CitationTestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee

Reporter

This task is for implementation of Linked Data counterpart of outbound connection to the Inventory/SRS.
Generally speaking we need to satisfy mod-inventory consumer expectations from , namely:
1) Kafka message contract:
topic naming pattern:
{env}.{tenant}.linked-data.instance-ingress
topic pattern and DTO are defined in and also could be taken from mod-inventory source code after merging;
2) Each marc-bib json should contain 3 required fields:
Leader - already the case, it’s always presented;
Title (marc 245) - not implemented as always presented (validation to be added to BE API, returning 400 response in case no title provided during Instance create/update)
ControlField 008 - not implemented as always presented (sending 008 with spaces is enough)
3) Each Kafka message should be provided with required data:
eventType
(CREATE_INSTANCE
here)InstanceIngressPayload
.tenantId
InstanceIngressPayload
.sourceType
(LINKED_DATA here)InstanceIngressPayload
.sourceRecordIdentifier (random UUID to be used as Inventory ID)
InstanceIngressPayload
.sourceRecordObject
(marc-bib json)InstanceIngressPayload
.additionalProperties
should containlinkedDataId
key with our resource ID valueKafka header
x-okapi-url
Kafka header
x-okapi-token
Testing scope:
Create an instance in linked-data-editor.
Wait for about 10 seconds.
Search for the instance in Inventory application and ensure that the newly created Instance appear in the Inventory with source = LINKED_DATA
Ensure that the following properties of Graph resource are appearing in the corresponding instance created in Inventory
Graph property
Property name in Inventory Instance
Instance - Title
Resource tile
Index title
Instance - Statement of responsibility
Suffixed to Resource title
Work - LC Classification
Classification - LC
Work - Dewey Classification
Classification - Dewey
Work - Content type
Resource type term