diff --git a/mod-source-record-manager-server/src/main/java/org/folio/services/ChangeEngineServiceImpl.java b/mod-source-record-manager-server/src/main/java/org/folio/services/ChangeEngineServiceImpl.java index dfc9da0c4..c2e7a5df3 100644 --- a/mod-source-record-manager-server/src/main/java/org/folio/services/ChangeEngineServiceImpl.java +++ b/mod-source-record-manager-server/src/main/java/org/folio/services/ChangeEngineServiceImpl.java @@ -7,8 +7,8 @@ import static org.folio.rest.RestVerticle.MODULE_SPECIFIC_ARGS; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_ERROR; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_INCOMING_EDIFACT_RECORD_PARSED; +import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_INCOMING_MARC_BIB_RECORD_PARSED; -import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_MARC_BIB_FOR_ORDER_CREATED; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_MARC_FOR_DELETE_RECEIVED; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_MARC_FOR_UPDATE_RECEIVED; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_RAW_RECORDS_CHUNK_PARSED; @@ -201,7 +201,7 @@ private void processRecords(List parsedRecords, JobExecution jobExecutio } case DELETE_RECORD -> deleteRecords(parsedRecords, jobExecution, params) .onSuccess(ar -> promise.complete(parsedRecords)).onFailure(promise::fail); - case CREATE_ORDER -> sendEvents(parsedRecords, jobExecution, params, DI_MARC_BIB_FOR_ORDER_CREATED) + case CREATE_ORDER -> sendEvents(parsedRecords, jobExecution, params, DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED) .onSuccess(ar -> promise.complete(parsedRecords)).onFailure(promise::fail); case SEND_ERROR -> sendEvents(parsedRecords, jobExecution, params, DI_ERROR) .onSuccess(ar -> promise.complete(parsedRecords)).onFailure(promise::fail); diff --git a/mod-source-record-manager-server/src/main/java/org/folio/verticle/consumers/StoredRecordChunksKafkaHandler.java b/mod-source-record-manager-server/src/main/java/org/folio/verticle/consumers/StoredRecordChunksKafkaHandler.java index b57594ad7..65ecd26e1 100644 --- a/mod-source-record-manager-server/src/main/java/org/folio/verticle/consumers/StoredRecordChunksKafkaHandler.java +++ b/mod-source-record-manager-server/src/main/java/org/folio/verticle/consumers/StoredRecordChunksKafkaHandler.java @@ -44,9 +44,9 @@ import static java.lang.String.format; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_INCOMING_EDIFACT_RECORD_PARSED; -import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_MARC_BIB_FOR_ORDER_CREATED; -import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_SRS_MARC_AUTHORITY_RECORD_CREATED; +import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_INCOMING_MARC_BIB_RECORD_PARSED; +import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_SRS_MARC_AUTHORITY_RECORD_CREATED; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_SRS_MARC_HOLDING_RECORD_CREATED; import static org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.COMPLETED; import static org.folio.rest.jaxrs.model.JournalRecord.ActionType.CREATE; @@ -162,7 +162,7 @@ private Future setOrderEventTypeIfNeeded(JobExecution jobE .collect(Collectors.toList()); if (!actionProfiles.isEmpty() && checkIfOrderCreateActionProfileExists(actionProfiles)) { - dataImportEventTypes = DI_MARC_BIB_FOR_ORDER_CREATED; + dataImportEventTypes = DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED; LOGGER.debug("setOrderEventTypeIfNeeded:: Event type for Order's logic set by jobExecutionId {} ", jobExecution.getId()); } } diff --git a/mod-source-record-manager-server/src/test/java/org/folio/services/ChangeEngineServiceImplTest.java b/mod-source-record-manager-server/src/test/java/org/folio/services/ChangeEngineServiceImplTest.java index 6a086160e..8c165b0f7 100644 --- a/mod-source-record-manager-server/src/test/java/org/folio/services/ChangeEngineServiceImplTest.java +++ b/mod-source-record-manager-server/src/test/java/org/folio/services/ChangeEngineServiceImplTest.java @@ -3,8 +3,8 @@ import static org.folio.rest.jaxrs.model.ActionProfile.Action.CREATE; import static org.folio.rest.jaxrs.model.ActionProfile.FolioRecord.AUTHORITY; import static org.folio.rest.jaxrs.model.ActionProfile.FolioRecord.MARC_AUTHORITY; +import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_INCOMING_MARC_BIB_RECORD_PARSED; -import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_MARC_BIB_FOR_ORDER_CREATED; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_MARC_FOR_UPDATE_RECEIVED; import static org.folio.rest.jaxrs.model.ProfileSnapshotWrapper.ContentType.ACTION_PROFILE; import static org.folio.rest.jaxrs.model.ProfileSnapshotWrapper.ContentType.JOB_PROFILE; @@ -226,7 +226,7 @@ public void shouldCreateOrderWhenActionCreateOrder() { assertThat(actual, hasSize(1)); assertThat(actual.get(0).getRecordType(), equalTo(Record.RecordType.MARC_BIB)); assertThat(actual.get(0).getErrorRecord(), nullValue()); - verify(recordsPublishingService).sendEventsWithRecords(any(), eq(jobExecution.getId()), any(), eq(DI_MARC_BIB_FOR_ORDER_CREATED.value())); + verify(recordsPublishingService).sendEventsWithRecords(any(), eq(jobExecution.getId()), any(), eq(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())); } @Test diff --git a/mod-source-record-manager-server/src/test/java/org/folio/verticle/consumers/StoredRecordChunkConsumersVerticleTest.java b/mod-source-record-manager-server/src/test/java/org/folio/verticle/consumers/StoredRecordChunkConsumersVerticleTest.java index 5c6d652b0..826da84f8 100644 --- a/mod-source-record-manager-server/src/test/java/org/folio/verticle/consumers/StoredRecordChunkConsumersVerticleTest.java +++ b/mod-source-record-manager-server/src/test/java/org/folio/verticle/consumers/StoredRecordChunkConsumersVerticleTest.java @@ -39,9 +39,9 @@ import static com.github.tomakehurst.wiremock.client.WireMock.post; import static java.nio.charset.StandardCharsets.UTF_8; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_ERROR; -import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_MARC_BIB_FOR_ORDER_CREATED; -import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_PARSED_RECORDS_CHUNK_SAVED; +import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED; import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_INCOMING_MARC_BIB_RECORD_PARSED; +import static org.folio.rest.jaxrs.model.DataImportEventTypes.DI_PARSED_RECORDS_CHUNK_SAVED; import static org.folio.rest.jaxrs.model.Record.RecordType.MARC_BIB; import static org.folio.rest.util.OkapiConnectionParams.OKAPI_TENANT_HEADER; import static org.folio.rest.util.OkapiConnectionParams.OKAPI_TOKEN_HEADER; @@ -192,10 +192,10 @@ public void shouldSendEventForOrderIfOrderActionProfileExists() throws Interrupt kafkaCluster.send(request); // then - List observedValues = observeValuesAndFilterByLeader("00115nam 22000731a 4500", DI_MARC_BIB_FOR_ORDER_CREATED, 1); + List observedValues = observeValuesAndFilterByLeader("00115nam 22000731a 4500", DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED, 1); Event obtainedEvent = Json.decodeValue(observedValues.get(0), Event.class); DataImportEventPayload eventPayload = Json.decodeValue(obtainedEvent.getEventPayload(), DataImportEventPayload.class); - assertEquals(DI_MARC_BIB_FOR_ORDER_CREATED.value(), eventPayload.getEventType()); + assertEquals(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value(), eventPayload.getEventType()); assertEquals(TENANT_ID, eventPayload.getTenant()); assertNotNull(eventPayload.getContext().get(EntityType.MARC_BIBLIOGRAPHIC.value())); assertNotNull(eventPayload.getContext().get(JOB_PROFILE_SNAPSHOT_ID)); diff --git a/ramls/raml-storage b/ramls/raml-storage index 3f6af3f26..28a5e2034 160000 --- a/ramls/raml-storage +++ b/ramls/raml-storage @@ -1 +1 @@ -Subproject commit 3f6af3f264dfa984338afe128412f0e20d02e361 +Subproject commit 28a5e2034f1cf11fa62d2b6f5df2ee6dcc18d921