Skip to content

Commit

Permalink
MODDATAIMP-957: update DI_MARC_BIB_FOR_ORDER_CREATED event to DI_INCO…
Browse files Browse the repository at this point in the history
…MING_MARC_BIB_FOR_ORDER_PARSED (#828)
  • Loading branch information
yaroslav-epam authored Jan 26, 2024
1 parent 526b6c6 commit 9d8fc2f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import java.util.ArrayList;
import java.util.List;

import static org.folio.DataImportEventTypes.DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED;
import static org.folio.DataImportEventTypes.DI_INVENTORY_INSTANCE_MATCHED;
import static org.folio.DataImportEventTypes.DI_MARC_BIB_FOR_ORDER_CREATED;
import static org.folio.DataImportEventTypes.DI_ORDER_CREATED_READY_FOR_POST_PROCESSING;
import static org.springframework.beans.factory.config.BeanDefinition.SCOPE_PROTOTYPE;

Expand Down Expand Up @@ -58,7 +58,7 @@ public class DataImportConsumerVerticle extends AbstractVerticle {

public List<String> getEvents() {
return List.of(
DI_MARC_BIB_FOR_ORDER_CREATED.value(),
DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value(),
DI_INVENTORY_INSTANCE_MATCHED.value(),
DI_ORDER_CREATED_READY_FOR_POST_PROCESSING.value());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
import static org.folio.ActionProfile.FolioRecord.ITEM;
import static org.folio.DataImportEventTypes.DI_COMPLETED;
import static org.folio.DataImportEventTypes.DI_ERROR;
import static org.folio.DataImportEventTypes.DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED;
import static org.folio.DataImportEventTypes.DI_INVENTORY_INSTANCE_MATCHED;
import static org.folio.DataImportEventTypes.DI_MARC_BIB_FOR_ORDER_CREATED;
import static org.folio.DataImportEventTypes.DI_ORDER_CREATED;
import static org.folio.DataImportEventTypes.DI_ORDER_CREATED_READY_FOR_POST_PROCESSING;
import static org.folio.DataImportEventTypes.DI_PENDING_ORDER_CREATED;
Expand Down Expand Up @@ -235,7 +235,7 @@ public void shouldCreatePendingOrderAndPublishDiCompletedEvent() throws Interrup

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withCurrentNode(profileSnapshotWrapper.getChildSnapshotWrappers().get(0))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
Expand Down Expand Up @@ -300,7 +300,7 @@ public void shouldCreatePendingOrderAndPublishDiCompletedEventWhenActionProfileI

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withCurrentNode(profileSnapshotWrapper.getChildSnapshotWrappers().get(0))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
Expand Down Expand Up @@ -330,7 +330,7 @@ public void shouldCreatePendingOrderAndPublishDiCompletedEventAndSetApprovedFals

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withCurrentNode(profileSnapshotWrapper.getChildSnapshotWrappers().get(0))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withTenant(TENANT_APPROVAL_REQUIRED)
.withOkapiUrl(OKAPI_URL)
Expand Down Expand Up @@ -372,7 +372,7 @@ public void shouldCreatePendingOrderAndPublishDiReadyForPostProcessingEventWhenO
addMockEntry(JOB_PROFILE_SNAPSHOTS_MOCK, profileSnapshotWrapper);

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
Expand Down Expand Up @@ -438,7 +438,7 @@ public void shouldCreatePendingOrderAndPublishDiPendingOrderCreatedEventWhenOpen
addMockEntry(JOB_PROFILE_SNAPSHOTS_MOCK, profileSnapshotWrapper);

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
Expand Down Expand Up @@ -472,7 +472,7 @@ public void shouldCreatePendingOrderAndPublishDiReadyForPostProcessingEventWhenO
addMockEntry(JOB_PROFILE_SNAPSHOTS_MOCK, profileSnapshotWrapper);

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
Expand Down Expand Up @@ -506,7 +506,7 @@ public void shouldCreatePendingOrderAndPublishDiReadyForPostProcessingEventWhenO
addMockEntry(JOB_PROFILE_SNAPSHOTS_MOCK, profileSnapshotWrapper);

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withTenant(TENANT_APPROVAL_REQUIRED)
.withOkapiUrl(OKAPI_URL)
Expand Down Expand Up @@ -550,7 +550,7 @@ public void shouldCreatePendingOrderAndPublishDiCompletedEventWhenOpenStatusSpec
addMockEntry(JOB_PROFILE_SNAPSHOTS_MOCK, profileSnapshotWrapper);

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withTenant(TENANT_APPROVAL_REQUIRED)
.withOkapiUrl(OKAPI_URL)
Expand Down Expand Up @@ -624,7 +624,7 @@ public void shouldCreatePendingOrderAndPublishDiCompletedEventWhenOpenStatusSpec

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_APPROVAL_REQUIRED)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -661,7 +661,7 @@ public void shouldCreatePendingOrderAndPublishDiReadyForPostProcessingEventWhenO

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_APPROVAL_REQUIRED)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -737,7 +737,7 @@ public void shouldPublishDiErrorEventWhenHasNoSourceRecord() throws InterruptedE

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -773,7 +773,7 @@ public void shouldCreatePoLineAndCalculateActivationDueFieldWhenActivationDueSpe

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -809,7 +809,7 @@ public void shouldCreatePoLineAndCalculateActivationDueFieldWhenActivationDueSpe

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -853,7 +853,7 @@ public void shouldOverrideConfiguredPoLinesLimitWhenPoLinesLimitSpecifiedAtMappi

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -1083,7 +1083,7 @@ private DataImportEventPayload importPoLineWithCreateInventoryFieldBasedOnAction

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -1124,7 +1124,7 @@ public void shouldCreateOrderWithSpecifiedAcquisitionUnitWhenUserHasUnitsAssignm

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -1162,7 +1162,7 @@ public void shouldPublishDiErrorWhenMappedOrderIsInvalid() throws InterruptedExc

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -1200,7 +1200,7 @@ public void shouldPublishDiErrorEventAndClearOrderIdInPoLineWhenPoLineIsInvalid(
DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withCurrentNode(profileSnapshotWrapper.getChildSnapshotWrappers().get(0))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -1237,7 +1237,7 @@ public void shouldIncrementPoLinesProgressWhenFailedToCreatePoLineAndPublishDiCo
DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withCurrentNode(profileSnapshotWrapper.getChildSnapshotWrappers().get(0))
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -1277,7 +1277,7 @@ public void shouldReturnFailedByDuplicateEventExceptionFutureWhenOrderIdDuplicat
DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withCurrentNode(profileSnapshotWrapper.getChildSnapshotWrappers().get(0))
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -1325,7 +1325,7 @@ record = getRecord(i);
dataImportEventPayload = new DataImportEventPayload()
.withCurrentNode(profileSnapshotWrapper.getChildSnapshotWrappers().get(0))
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -1417,7 +1417,7 @@ public void shouldCreatePendingOrderAndMapVendorMaterialSupplierAndAccessProvide
DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withCurrentNode(profileSnapshotWrapper.getChildSnapshotWrappers().get(0))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -1475,7 +1475,7 @@ public void shouldCreatePendingOrderAndNotMapVendorMaterialSupplierAndAccessProv
DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withCurrentNode(profileSnapshotWrapper.getChildSnapshotWrappers().get(0))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
.withToken(TOKEN)
Expand Down Expand Up @@ -1511,7 +1511,7 @@ public void shouldReturnFailedByDuplicateEventExceptionFutureWhenRecordIdIsDupli

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withCurrentNode(profileSnapshotWrapper.getChildSnapshotWrappers().get(0))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
Expand Down Expand Up @@ -1542,7 +1542,7 @@ public void shouldNotReturnFailedByDuplicateEventExceptionFutureWhenRecordIdIsDi

DataImportEventPayload dataImportEventPayload = new DataImportEventPayload()
.withCurrentNode(profileSnapshotWrapper.getChildSnapshotWrappers().get(0))
.withEventType(DI_MARC_BIB_FOR_ORDER_CREATED.value())
.withEventType(DI_INCOMING_MARC_BIB_FOR_ORDER_PARSED.value())
.withJobExecutionId(jobExecutionJson.getString(ID_FIELD))
.withTenant(TENANT_ID)
.withOkapiUrl(OKAPI_URL)
Expand Down

0 comments on commit 9d8fc2f

Please sign in to comment.