In this story we need to make mod-inventory to generate Holdings from incoming SRS Marc Holdings
Create a new handler CreateMarcHoldingsEventHandler that handles the event DI_SRS_MARC_HOLDINGS_RECORD_CREATED. The new handler should be written in the same principle as CreateInstanceEventHandler.
What the CreateMarcHoldingsEventHandler receives in event payload:
- default mapping rules
- SRS Holdings record
What the CreateMarcHoldingsEventHandler does:
- generates Holdings using the corresponding Processor from data-import-processing-core
- retrieves Inventory Instance by the given HRID, takes instance.id and sets instanceId to generated Holdings
- saves Holdings to the DB
- throws DI_INVENTORY_HOLDINGS_CREATED_READY_FOR_POST_PROCESSING, prepare event payload for post-processing.
- The mod-inventory accepts DI_SRS_MARC_HOLDINGS_RECORD_CREATED event generating Holdings
- The functionality is covered by unit tests
- The created Holdings are available from mod-inventory UI application to view