diff --git a/CHANGELOG.md b/CHANGELOG.md index e7bc735b46..01e35a4ddf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha ### Changed +- BPN summary was removed from Job response #568 - Shells in Job response will contain all submodel descriptors returned by provider, instead filtered by aspect-type parameter. #510 ## [5.1.1] - 2024-05-08 diff --git a/docs/src/api/irs-api.yaml b/docs/src/api/irs-api.yaml index 41e0d96965..87a2c8aef5 100644 --- a/docs/src/api/irs-api.yaml +++ b/docs/src/api/irs-api.yaml @@ -1121,9 +1121,6 @@ components: completed: 3 failed: 0 running: 0 - bpnLookups: - completed: 3 - failed: 0 relationships: - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 linkedItem: @@ -2154,7 +2151,7 @@ components: additionalProperties: false description: Container for a job with item graph. example: |- - {"bpns"=[{"manufacturerId"="BPNL00000003AAXX", "manufacturerName"="AB CD"}], "job"={"completedOn"="2022-02-03T14:48:54.709Z", "createdOn"="2022-02-03T14:48:54.709Z", "exception"={"errorDetail"="Timeout while requesting Digital Registry", "exception"="IrsTimeoutException", "exceptionDate"="2022-02-03T14:48:54.709Z"}, "globalAssetId"="urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0", "id"="e5347c88-a921-11ec-b909-0242ac120002", "lastModifiedOn"="2022-02-03T14:48:54.709Z", "parameter"={"aspects"=["SerialPart", "AddressAspect"], "auditContractNegotiation"=false, "bomLifecycle"="asBuilt", "collectAspects"=false, "depth"=1, "direction"="downward", "lookupBPNs"=false}, "startedOn"="2022-02-03T14:48:54.709Z", "state"="COMPLETED", "summary"={"asyncFetchedItems"={"completed"=3, "failed"=0, "running"=0}, "bpnLookups"={"completed"=3, "failed"=0}}}, "relationships"=[{"catenaXId"="urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447", "linkedItem"={"assembledOn"="2022-02-03T14:48:54.709Z", "childCatenaXId"="urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9", "hasAlternatives"=false, "lastModifiedOn"="2022-02-03T14:48:54.709Z", "lifecycleContext"="asBuilt", "quantity"={"measurementUnit"={"datatypeURI"="urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece", "lexicalValue"="piece"}, "quantityNumber"=1}}}], "shells"=[{"contractAgreementId"="f253718e-a270-4367-901b-9d50d9bd8462", "payload"={"description"=[{"language"="en", "text"="The shell for a vehicle"}], "globalAssetId"="urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9", "id"="urn:uuid:882fc530-b69b-4707-95f6-5dbc5e9baaa8", "idShort"="future concept x", "specificAssetIds"=[{"name"="engineserialid", "value"="12309481209312"}], "submodelDescriptors"=[{"description"=[{"language"="en", "text"="Provides base vehicle information"}], "endpoints"=[{"interface"="HTTP", "protocolInformation"={"endpointProtocol"="HTTPS", "endpointProtocolVersion"=["1.0"], "href"="https://catena-x.net/vehicle/basedetails/", "subprotocol"="DSP", "subprotocolBody"="id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net", "subprotocolBodyEncoding"="plain"}}], "id"="urn:uuid:5d25a897-6571-4800-b98c-a3352fbf996d", "idShort"="SingleLevelBomAsPlanned", "semanticId"={"keys"=[{"type"="ExternalReference", "value"="urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned"}], "type"="ModelReference"}}, + {"bpns"=[{"manufacturerId"="BPNL00000003AAXX", "manufacturerName"="AB CD"}], "job"={"completedOn"="2022-02-03T14:48:54.709Z", "createdOn"="2022-02-03T14:48:54.709Z", "exception"={"errorDetail"="Timeout while requesting Digital Registry", "exception"="IrsTimeoutException", "exceptionDate"="2022-02-03T14:48:54.709Z"}, "globalAssetId"="urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0", "id"="e5347c88-a921-11ec-b909-0242ac120002", "lastModifiedOn"="2022-02-03T14:48:54.709Z", "parameter"={"aspects"=["SerialPart", "AddressAspect"], "auditContractNegotiation"=false, "bomLifecycle"="asBuilt", "collectAspects"=false, "depth"=1, "direction"="downward", "lookupBPNs"=false}, "startedOn"="2022-02-03T14:48:54.709Z", "state"="COMPLETED", "summary"={"asyncFetchedItems"={"completed"=3, "failed"=0, "running"=0}}}, "relationships"=[{"catenaXId"="urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447", "linkedItem"={"assembledOn"="2022-02-03T14:48:54.709Z", "childCatenaXId"="urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9", "hasAlternatives"=false, "lastModifiedOn"="2022-02-03T14:48:54.709Z", "lifecycleContext"="asBuilt", "quantity"={"measurementUnit"={"datatypeURI"="urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece", "lexicalValue"="piece"}, "quantityNumber"=1}}}], "shells"=[{"contractAgreementId"="f253718e-a270-4367-901b-9d50d9bd8462", "payload"={"description"=[{"language"="en", "text"="The shell for a vehicle"}], "globalAssetId"="urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9", "id"="urn:uuid:882fc530-b69b-4707-95f6-5dbc5e9baaa8", "idShort"="future concept x", "specificAssetIds"=[{"name"="engineserialid", "value"="12309481209312"}], "submodelDescriptors"=[{"description"=[{"language"="en", "text"="Provides base vehicle information"}], "endpoints"=[{"interface"="HTTP", "protocolInformation"={"endpointProtocol"="HTTPS", "endpointProtocolVersion"=["1.0"], "href"="https://catena-x.net/vehicle/basedetails/", "subprotocol"="DSP", "subprotocolBody"="id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net", "subprotocolBodyEncoding"="plain"}}], "id"="urn:uuid:5d25a897-6571-4800-b98c-a3352fbf996d", "idShort"="SingleLevelBomAsPlanned", "semanticId"={"keys"=[{"type"="ExternalReference", "value"="urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned"}], "type"="ModelReference"}}, {"description"=[{"language"="en", "text"="Provides base vehicle information"}], "endpoints"=[{"interface"="HTTP", "protocolInformation"={"endpointProtocol"="HTTPS", "endpointProtocolVersion"=["1.0"], "href"="https://catena-x.net/vehicle/partdetails/", "subprotocol"="DSP", "subprotocolBody"="id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net", "subprotocolBodyEncoding"="plain"}}], "id"="urn:uuid:dae4d249-6d66-4818-b576-bf52f3b9ae90", "idShort"="vehicle part details", "semanticId"={"keys"=[{"type"="Submodel", "value"="urn:bamm:com.catenax.vehicle:0.1.1#PartDetails"}], "type"="ModelReference"}}]}}], "submodels"=[{"aspectType"="supply_chain_impacted", "contractAgreementId"="f253718e-a270-4367-901b-9d50d9bd8462", "identification"="urn:uuid:fc784d2a-5506-4e61-8e34-21600f8cdeff", "payload"={"supplyChainImpacted"="YES"}}], "tombstones"=[{"catenaXId"="urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0", "endpointURL"="https://catena-x.net/vehicle/partdetails/", "processingError"={"errorDetail"="Details to reason of failure", "lastAttempt"="2022-02-03T14:48:54.709Z", "processStep"="SchemaValidation", "retryCounter"=0}}]} properties: bpns: @@ -2754,8 +2751,6 @@ components: properties: asyncFetchedItems: $ref: '#/components/schemas/AsyncFetchedItems' - bpnLookups: - $ref: '#/components/schemas/AsyncFetchedItems' Tombstone: type: object additionalProperties: false diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java index 53d08190e1..ab7288c33b 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java @@ -34,7 +34,6 @@ import org.eclipse.tractusx.irs.component.BatchOrderResponse; import org.eclipse.tractusx.irs.component.BatchResponse; import org.eclipse.tractusx.irs.component.Bpn; -import org.eclipse.tractusx.irs.component.FetchedItems; import org.eclipse.tractusx.irs.component.GlobalAssetIdentification; import org.eclipse.tractusx.irs.component.Job; import org.eclipse.tractusx.irs.component.JobErrorDetails; @@ -284,7 +283,6 @@ private Example createCompleteEssJobResult() { .completed(FETCHED_ITEMS_SIZE) .failed(NO_RUNNING_OR_FAILED_ITEMS) .build(), - FetchedItems.builder().completed(FETCHED_ITEMS_SIZE).failed(NO_RUNNING_OR_FAILED_ITEMS).build(), SENT_NOTIFICATIONS_SIZE, SENT_NOTIFICATIONS_SIZE); final Job job = essJobsJobs.getJob().toBuilder().summary(newSummary).build(); return toExample(essJobsJobs.toBuilder().job(job).build()); diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/BpnInvestigationJob.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/BpnInvestigationJob.java index bf2128a838..3ee55bda70 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/BpnInvestigationJob.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/BpnInvestigationJob.java @@ -167,7 +167,6 @@ private Jobs updateLastModified(final Jobs irsJob, final ZonedDateTime lastModif private Jobs extendSummary(final Jobs irsJob) { final Summary oldSummary = Optional.ofNullable(irsJob.getJob().getSummary()).orElse(Summary.builder().build()); final NotificationSummary newSummary = new NotificationSummary(oldSummary.getAsyncFetchedItems(), - oldSummary.getBpnLookups(), new NotificationItems(unansweredNotifications.size() + answeredNotifications.size(), answeredNotifications.size())); final Job job = irsJob.getJob().toBuilder().summary(newSummary).build(); diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/NotificationSummary.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/NotificationSummary.java index bf3445b62a..c74032c7c8 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/NotificationSummary.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/NotificationSummary.java @@ -30,7 +30,6 @@ import lombok.Value; import lombok.extern.jackson.Jacksonized; import org.eclipse.tractusx.irs.component.AsyncFetchedItems; -import org.eclipse.tractusx.irs.component.FetchedItems; import org.eclipse.tractusx.irs.component.Summary; /** @@ -42,15 +41,14 @@ public class NotificationSummary extends Summary { private final NotificationItems notifications; - public NotificationSummary(final AsyncFetchedItems asyncFetchedItems, final FetchedItems bpnLookups, - final NotificationItems notificationItems) { - super(asyncFetchedItems, bpnLookups); + public NotificationSummary(final AsyncFetchedItems asyncFetchedItems, final NotificationItems notificationItems) { + super(asyncFetchedItems); this.notifications = notificationItems; } - public NotificationSummary(final AsyncFetchedItems asyncFetchedItems, final FetchedItems bpnLookups, - final Integer sentNotification, final Integer receivedNotification) { - super(asyncFetchedItems, bpnLookups); + public NotificationSummary(final AsyncFetchedItems asyncFetchedItems, final Integer sentNotification, + final Integer receivedNotification) { + super(asyncFetchedItems); this.notifications = new NotificationItems(sentNotification, receivedNotification); } } diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryService.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryService.java index 6f27f65a40..e3e6a13e93 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryService.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryService.java @@ -47,7 +47,6 @@ import org.eclipse.tractusx.irs.common.persistence.BlobPersistenceException; import org.eclipse.tractusx.irs.component.AsyncFetchedItems; import org.eclipse.tractusx.irs.component.Bpn; -import org.eclipse.tractusx.irs.component.FetchedItems; import org.eclipse.tractusx.irs.component.Job; import org.eclipse.tractusx.irs.component.JobHandle; import org.eclipse.tractusx.irs.component.JobParameter; @@ -295,7 +294,6 @@ private Summary buildSummary(final int completedTransfersSize, final int running .running(runningSize) .failed(tombstonesSize) .build()) - .bpnLookups(FetchedItems.builder().completed(0).failed(0).build()) .build(); } diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java index 58d4a1fe29..47ce8f4fa1 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java @@ -87,7 +87,6 @@ static RegisterJob jobRequest(final String globalAssetId, final String bpn, fina .depth(depth) .aspects(List.of(batchAspectName, singleLevelBomAsBuiltAspectName)) .collectAspects(true) - .lookupBPNs(true) .direction(Direction.DOWNWARD) .build(); } diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/controllers/IrsControllerTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/controllers/IrsControllerTest.java index 4dea897404..f2d74a8169 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/controllers/IrsControllerTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/controllers/IrsControllerTest.java @@ -197,8 +197,7 @@ void shouldReturnBadRequestWhenRegisterJobWithInvalidDirection(String invalidDir "globalAssetId": "urn:uuid:c6d2d642-a055-4ddf-87e3-1a3b02c689e3", "bpn": "BPNL00000000BJTL" }, - "direction": "", - "lookupBPNs": true + "direction": "" } """.replace("", invalidDirection)) .post("/irs/jobs") diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/util/TestMother.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/util/TestMother.java index d289a8b01c..179e8b2d31 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/util/TestMother.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/util/TestMother.java @@ -187,16 +187,6 @@ public static JobParameter jobParameterFilter() { .build(); } - public static JobParameter jobParameterCollectBpns() { - return JobParameter.builder() - .depth(0) - .bomLifecycle(BomLifecycle.AS_BUILT) - .direction(Direction.DOWNWARD) - .aspects(List.of(serialPartAspectName, singleLevelBomAsBuiltAspectName)) - .lookupBPNs(true) - .build(); - } - public static JobParameter jobParameterAuditContractNegotiation() { return JobParameter.builder() .depth(5) diff --git a/irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/E2ETestStepDefinitionsForJobApi.java b/irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/E2ETestStepDefinitionsForJobApi.java index 421238f243..5449c4b208 100644 --- a/irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/E2ETestStepDefinitionsForJobApi.java +++ b/irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/E2ETestStepDefinitionsForJobApi.java @@ -160,12 +160,6 @@ public void collectAspects(String collectAspects) { registerBatchOrderBuilder.collectAspects(Boolean.parseBoolean(collectAspects)); } - @And("lookupBPNs {string}") - public void lookupBPNs(String lookupBPNs) { - registerJobBuilder.lookupBPNs(Boolean.parseBoolean(lookupBPNs)); - registerBatchOrderBuilder.lookupBPNs(Boolean.parseBoolean(lookupBPNs)); - } - @And("depth {int}") public void depth(int depth) { registerJobBuilder.depth(depth); @@ -368,9 +362,6 @@ public void iCheckIfSummaryContainsCompletedAndFailedItems(String summary, int c if ("summary".equals(summary)) { assertThat(completedJob.getJob().getSummary().getAsyncFetchedItems().getCompleted()).isEqualTo(completed); assertThat(completedJob.getJob().getSummary().getAsyncFetchedItems().getFailed()).isEqualTo(failed); - } else if ("bpn summary".equals(summary)) { - assertThat(completedJob.getJob().getSummary().getBpnLookups().getCompleted()).isEqualTo(completed); - assertThat(completedJob.getJob().getSummary().getBpnLookups().getFailed()).isEqualTo(failed); } } @@ -437,11 +428,6 @@ public void directionIs(String direction) { assertThat(completedJob.getJob().getParameter().getDirection()).isEqualTo(Direction.fromValue(direction)); } - @And("lookupBPNs is {string}") - public void lookupBPNsIs(String lookupBPNs) { - assertThat(completedJob.getJob().getParameter().isLookupBPNs()).isEqualTo(Boolean.valueOf(lookupBPNs)); - } - @And("bomLifecycle is {string}") public void bomLifecycleIs(String bomLifecycle) { assertThat(completedJob.getJob().getParameter().getBomLifecycle()).isEqualTo( diff --git a/irs-models/src/main/java/org/eclipse/tractusx/irs/component/FetchedItems.java b/irs-models/src/main/java/org/eclipse/tractusx/irs/component/FetchedItems.java deleted file mode 100644 index 8a9652e5c9..0000000000 --- a/irs-models/src/main/java/org/eclipse/tractusx/irs/component/FetchedItems.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022,2024 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2024: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ -package org.eclipse.tractusx.irs.component; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.Max; -import jakarta.validation.constraints.Min; -import lombok.Builder; -import lombok.Value; -import lombok.extern.jackson.Jacksonized; - -/** - * Describe the state of the fetched items - */ -@Schema(description = "Statistics of job execution.") -@Value -@Builder(toBuilder = true) -@Jacksonized -public class FetchedItems { - - @Schema(description = "Number of completed items.", implementation = Integer.class) - @Min(0) - @Max(Integer.MAX_VALUE) - private Integer completed; - - @Schema(description = "Number of failed items.", implementation = Integer.class) - @Min(0) - @Max(Integer.MAX_VALUE) - private Integer failed; - -} diff --git a/irs-models/src/main/java/org/eclipse/tractusx/irs/component/Jobs.java b/irs-models/src/main/java/org/eclipse/tractusx/irs/component/Jobs.java index e9ac4c3ffa..21788190b8 100644 --- a/irs-models/src/main/java/org/eclipse/tractusx/irs/component/Jobs.java +++ b/irs-models/src/main/java/org/eclipse/tractusx/irs/component/Jobs.java @@ -67,7 +67,7 @@ public class Jobs { @Singular private Set bpns; - /* package */ static final String EXAMPLE = "{\"bpns\"=[{\"manufacturerId\"=\"BPNL00000003AAXX\", \"manufacturerName\"=\"AB CD\"}], \"job\"={\"completedOn\"=\"2022-02-03T14:48:54.709Z\", \"createdOn\"=\"2022-02-03T14:48:54.709Z\", \"exception\"={\"errorDetail\"=\"Timeout while requesting Digital Registry\", \"exception\"=\"IrsTimeoutException\", \"exceptionDate\"=\"2022-02-03T14:48:54.709Z\"}, \"globalAssetId\"=\"urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0\", \"id\"=\"e5347c88-a921-11ec-b909-0242ac120002\", \"lastModifiedOn\"=\"2022-02-03T14:48:54.709Z\", \"parameter\"={\"aspects\"=[\"SerialPart\", \"AddressAspect\"], \"auditContractNegotiation\"=false, \"bomLifecycle\"=\"asBuilt\", \"collectAspects\"=false, \"depth\"=1, \"direction\"=\"downward\", \"lookupBPNs\"=false}, \"startedOn\"=\"2022-02-03T14:48:54.709Z\", \"state\"=\"COMPLETED\", \"summary\"={\"asyncFetchedItems\"={\"completed\"=3, \"failed\"=0, \"running\"=0}, \"bpnLookups\"={\"completed\"=3, \"failed\"=0}}}, \"relationships\"=[{\"catenaXId\"=\"urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447\", \"linkedItem\"={\"assembledOn\"=\"2022-02-03T14:48:54.709Z\", \"childCatenaXId\"=\"urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9\", \"hasAlternatives\"=false, \"lastModifiedOn\"=\"2022-02-03T14:48:54.709Z\", \"lifecycleContext\"=\"asBuilt\", \"quantity\"={\"measurementUnit\"={\"datatypeURI\"=\"urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece\", \"lexicalValue\"=\"piece\"}, \"quantityNumber\"=1}}}], \"shells\"=[{\"contractAgreementId\"=\"f253718e-a270-4367-901b-9d50d9bd8462\", \"payload\"={\"description\"=[{\"language\"=\"en\", \"text\"=\"The shell for a vehicle\"}], \"globalAssetId\"=\"urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9\", \"id\"=\"urn:uuid:882fc530-b69b-4707-95f6-5dbc5e9baaa8\", \"idShort\"=\"future concept x\", \"specificAssetIds\"=[{\"name\"=\"engineserialid\", \"value\"=\"12309481209312\"}], \"submodelDescriptors\"=[{\"description\"=[{\"language\"=\"en\", \"text\"=\"Provides base vehicle information\"}], \"endpoints\"=[{\"interface\"=\"HTTP\", \"protocolInformation\"={\"endpointProtocol\"=\"HTTPS\", \"endpointProtocolVersion\"=[\"1.0\"], \"href\"=\"https://catena-x.net/vehicle/basedetails/\", \"subprotocol\"=\"DSP\", \"subprotocolBody\"=\"id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net\", \"subprotocolBodyEncoding\"=\"plain\"}}], \"id\"=\"urn:uuid:5d25a897-6571-4800-b98c-a3352fbf996d\", \"idShort\"=\"SingleLevelBomAsPlanned\", \"semanticId\"={\"keys\"=[{\"type\"=\"ExternalReference\", \"value\"=\"urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned\"}], \"type\"=\"ModelReference\"}},\n" + /* package */ static final String EXAMPLE = "{\"bpns\"=[{\"manufacturerId\"=\"BPNL00000003AAXX\", \"manufacturerName\"=\"AB CD\"}], \"job\"={\"completedOn\"=\"2022-02-03T14:48:54.709Z\", \"createdOn\"=\"2022-02-03T14:48:54.709Z\", \"exception\"={\"errorDetail\"=\"Timeout while requesting Digital Registry\", \"exception\"=\"IrsTimeoutException\", \"exceptionDate\"=\"2022-02-03T14:48:54.709Z\"}, \"globalAssetId\"=\"urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0\", \"id\"=\"e5347c88-a921-11ec-b909-0242ac120002\", \"lastModifiedOn\"=\"2022-02-03T14:48:54.709Z\", \"parameter\"={\"aspects\"=[\"SerialPart\", \"AddressAspect\"], \"auditContractNegotiation\"=false, \"bomLifecycle\"=\"asBuilt\", \"collectAspects\"=false, \"depth\"=1, \"direction\"=\"downward\", \"lookupBPNs\"=false}, \"startedOn\"=\"2022-02-03T14:48:54.709Z\", \"state\"=\"COMPLETED\", \"summary\"={\"asyncFetchedItems\"={\"completed\"=3, \"failed\"=0, \"running\"=0}}}, \"relationships\"=[{\"catenaXId\"=\"urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447\", \"linkedItem\"={\"assembledOn\"=\"2022-02-03T14:48:54.709Z\", \"childCatenaXId\"=\"urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9\", \"hasAlternatives\"=false, \"lastModifiedOn\"=\"2022-02-03T14:48:54.709Z\", \"lifecycleContext\"=\"asBuilt\", \"quantity\"={\"measurementUnit\"={\"datatypeURI\"=\"urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece\", \"lexicalValue\"=\"piece\"}, \"quantityNumber\"=1}}}], \"shells\"=[{\"contractAgreementId\"=\"f253718e-a270-4367-901b-9d50d9bd8462\", \"payload\"={\"description\"=[{\"language\"=\"en\", \"text\"=\"The shell for a vehicle\"}], \"globalAssetId\"=\"urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9\", \"id\"=\"urn:uuid:882fc530-b69b-4707-95f6-5dbc5e9baaa8\", \"idShort\"=\"future concept x\", \"specificAssetIds\"=[{\"name\"=\"engineserialid\", \"value\"=\"12309481209312\"}], \"submodelDescriptors\"=[{\"description\"=[{\"language\"=\"en\", \"text\"=\"Provides base vehicle information\"}], \"endpoints\"=[{\"interface\"=\"HTTP\", \"protocolInformation\"={\"endpointProtocol\"=\"HTTPS\", \"endpointProtocolVersion\"=[\"1.0\"], \"href\"=\"https://catena-x.net/vehicle/basedetails/\", \"subprotocol\"=\"DSP\", \"subprotocolBody\"=\"id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net\", \"subprotocolBodyEncoding\"=\"plain\"}}], \"id\"=\"urn:uuid:5d25a897-6571-4800-b98c-a3352fbf996d\", \"idShort\"=\"SingleLevelBomAsPlanned\", \"semanticId\"={\"keys\"=[{\"type\"=\"ExternalReference\", \"value\"=\"urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned\"}], \"type\"=\"ModelReference\"}},\n" + " {\"description\"=[{\"language\"=\"en\", \"text\"=\"Provides base vehicle information\"}], \"endpoints\"=[{\"interface\"=\"HTTP\", \"protocolInformation\"={\"endpointProtocol\"=\"HTTPS\", \"endpointProtocolVersion\"=[\"1.0\"], \"href\"=\"https://catena-x.net/vehicle/partdetails/\", \"subprotocol\"=\"DSP\", \"subprotocolBody\"=\"id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net\", \"subprotocolBodyEncoding\"=\"plain\"}}], \"id\"=\"urn:uuid:dae4d249-6d66-4818-b576-bf52f3b9ae90\", \"idShort\"=\"vehicle part details\", \"semanticId\"={\"keys\"=[{\"type\"=\"Submodel\", \"value\"=\"urn:bamm:com.catenax.vehicle:0.1.1#PartDetails\"}], \"type\"=\"ModelReference\"}}]}}], \"submodels\"=[{\"aspectType\"=\"supply_chain_impacted\", \"contractAgreementId\"=\"f253718e-a270-4367-901b-9d50d9bd8462\", \"identification\"=\"urn:uuid:fc784d2a-5506-4e61-8e34-21600f8cdeff\", \"payload\"={\"supplyChainImpacted\"=\"YES\"}}], \"tombstones\"=[{\"catenaXId\"=\"urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0\", \"endpointURL\"=\"https://catena-x.net/vehicle/partdetails/\", \"processingError\"={\"errorDetail\"=\"Details to reason of failure\", \"lastAttempt\"=\"2022-02-03T14:48:54.709Z\", \"processStep\"=\"SchemaValidation\", \"retryCounter\"=0}}]}"; } diff --git a/irs-models/src/main/java/org/eclipse/tractusx/irs/component/Summary.java b/irs-models/src/main/java/org/eclipse/tractusx/irs/component/Summary.java index 166f7ead8d..5185bc9015 100644 --- a/irs-models/src/main/java/org/eclipse/tractusx/irs/component/Summary.java +++ b/irs-models/src/main/java/org/eclipse/tractusx/irs/component/Summary.java @@ -52,10 +52,4 @@ public class Summary { @Schema(description = "Summary of the fetched jobs", implementation = AsyncFetchedItems.class) private AsyncFetchedItems asyncFetchedItems; - /** - * BPN lookup summary - */ - @Schema(description = "Summary of the BPN lookups", implementation = AsyncFetchedItems.class) - private FetchedItems bpnLookups; - } diff --git a/local/deployment/irs-local/README.md b/local/deployment/irs-local/README.md index 1c9740243c..660edb4084 100644 --- a/local/deployment/irs-local/README.md +++ b/local/deployment/irs-local/README.md @@ -88,7 +88,6 @@ You can use these snippets for testing purposes. ```json { "bomLifecycle": "asBuilt", - "lookupBPNs": false, "direction": "downward", "depth": 10, "auditContractNegotiation": false, diff --git a/local/testing/api-tests/irs-api-tests.tavern.yaml b/local/testing/api-tests/irs-api-tests.tavern.yaml index a93c4d230c..5ce9d5612d 100644 --- a/local/testing/api-tests/irs-api-tests.tavern.yaml +++ b/local/testing/api-tests/irs-api-tests.tavern.yaml @@ -2470,7 +2470,6 @@ stages: depth: 2 direction: "downward" bomLifecycle: "asPlanned" - lookupBPNs: false callbackUrl: "https://www.check123.com" aspects: #- urn:samm:io.catenax.serial_part:3.0.0#SerialPart @@ -2578,7 +2577,6 @@ stages: globalAssetId: "{tavern.env_vars.GLOBAL_ASSET_ID_AS_BUILT}" bpn: "{tavern.env_vars.BPN_AS_BUILT}" collectAspects: false - lookupBPNs: false depth: 1 direction: "downward" method: POST @@ -2632,7 +2630,6 @@ stages: globalAssetId: "{tavern.env_vars.GLOBAL_ASSET_ID_AS_BUILT}" bpn: "{tavern.env_vars.BPN_AS_BUILT}" collectAspects: false - lookupBPNs: false depth: 1 direction: "downward" method: POST @@ -2733,7 +2730,6 @@ stages: - urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingeLevelBomAsBuilt - urn:samm:io.catenax.serial_part:3.0.0#SerialPart collectAspects: true - lookupBPNs: false batchSize: 10 batchStrategy: "PRESERVE_BATCH_JOB_ORDER" depth: 1 @@ -2793,7 +2789,6 @@ stages: - urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingeLevelBomAsBuilt - urn:samm:io.catenax.serial_part:3.0.0#SerialPart collectAspects: true - lookupBPNs: false batchSize: 2 batchStrategy: "PRESERVE_BATCH_JOB_ORDER" depth: 1 @@ -2845,7 +2840,6 @@ stages: - urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingeLevelBomAsBuilt - urn:samm:io.catenax.serial_part:3.0.0#SerialPart collectAspects: true - lookupBPNs: false batchSize: 10 batchStrategy: "PRESERVE_BATCH_JOB_ORDER" depth: 1 diff --git a/local/testing/api-tests/tavern_helpers.py b/local/testing/api-tests/tavern_helpers.py index 60bf733b22..58fe1cb9d1 100644 --- a/local/testing/api-tests/tavern_helpers.py +++ b/local/testing/api-tests/tavern_helpers.py @@ -48,7 +48,6 @@ def ESS_job_parameter_are_as_requested(response): assert parameter.get('collectAspects') is True assert parameter.get('depth') == 1 assert parameter.get('direction') == 'downward' - assert parameter.get('lookupBPNs') is False aspects_list = parameter.get("aspects") assert 'PartSiteInformationAsPlanned' in aspects_list assert 'PartAsPlanned' in aspects_list @@ -336,7 +335,6 @@ def job_parameter_are_as_requested(response): assert parameter.get('collectAspects') is True assert parameter.get('depth') == 2 assert parameter.get('direction') == 'downward' - assert parameter.get('lookupBPNs') is False assert parameter.get('callbackUrl') == 'https://www.check123.com' aspects_list = parameter.get("aspects") assert 'urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned' in aspects_list