Skip to content

Commit

Permalink
Merge pull request #671 from catenax-ng/feature/470-add-Version-to-re…
Browse files Browse the repository at this point in the history
…lationship-aspects

feat(irs-api):[#470] Add support for SingleLevelUsageAsPlanned
  • Loading branch information
ds-jhartmann committed Jun 7, 2024
2 parents 1ada347 + 549b16d commit a9077f0
Show file tree
Hide file tree
Showing 59 changed files with 2,944 additions and 1,882 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ _**For better traceability add the corresponding GitHub issue number in each cha
- Extended datamodel of EdcPolicyPermissionConstraint to include andConstraints
- Marked createAccessPolicy requests with deprecation mark.
- Remove edc namespace from EdcContractAgreementNegotiationResponse and
EdcContractAgreementsResponse eclipse-tractusx/traceability-foss#963
- Added missing @context values in edc asset creation eclipse-tractusx/traceability-foss#978
- Switch to `dct:type` `https://w3id.org/catenax/taxonomy#` for notification asset creation eclipse-tractusx/traceability-foss#978
EdcContractAgreementsResponse. eclipse-tractusx/traceability-foss#963
- Added missing @context values in edc asset creation. eclipse-tractusx/traceability-foss#978
- Switch to `dct:type` `https://w3id.org/catenax/taxonomy#` for notification asset creation. eclipse-tractusx/traceability-foss#978
- Shells in Job response will contain all submodel descriptors returned by provider, instead filtered by aspect-type parameter. #510

## Added

- Added endpoint for dedicated removal of policy from BPNL. #559
- Integration Test Policy Store API Unhappy Path. #519
- Support for SingleLevelUsageAsPlanned. #470
- Documentation to describe the delegate process. #470

## [5.1.4] - 2024-05-27

Expand Down
3 changes: 2 additions & 1 deletion COMPATIBILITY_MATRIX.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ Full changelog of IRS: [changelog](CHANGELOG.md)
| Kubernetes | 1.29 | - | - |
| SingleLevelBomAsBuilt | [ 2.0.0; 3.0.0 ] | - | Model version |
| SingleLevelBomAsPlanned | [ 2.0.0; 3.0.0 ] | - | Model version |
| SingleLevelBomAsSpecified | 1.0.0 | - | Model version |
| SingleLevelBomAsSpecified | 2.0.0 | - | Model version |
| SingleLevelUsageAsBuilt | 3.0.0 | - | Model version |
| SingleLevelUsageAsPlanned | 2.0.0 | - | Model version |

## [CATENA-X Release 24.05](https://eclipse-tractusx.github.io/CHANGELOG/) - [5.1.3](https://github.com/eclipse-tractusx/item-relationship-service/releases/tag/5.1.3) - 2024-05-17

Expand Down
50 changes: 24 additions & 26 deletions docs/src/api/irs-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1077,14 +1077,14 @@ components:
models:
- name: SingleLevelBomAsBuilt
status: RELEASED
type: BAMM
type: SAMM
urn: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt
version: 2.0.0
version: 3.0.0
- name: SerialPart
status: RELEASED
type: BAMM
urn: urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
version: 1.0.1
type: SAMM
urn: urn:samm:io.catenax.serial_part:3.0.0#SerialPart
version: 3.0.0
canceled-job-response:
value:
completedOn: 2022-02-03T14:48:54.709Z
Expand All @@ -1109,7 +1109,7 @@ components:
parameter:
aspects:
- urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt
- urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
- urn:samm:io.catenax.serial_part:3.0.0#SerialPart
auditContractNegotiation: false
bomLifecycle: asBuilt
collectAspects: false
Expand Down Expand Up @@ -1160,7 +1160,7 @@ components:
parameter:
aspects:
- urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt
- urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
- urn:samm:io.catenax.serial_part:3.0.0#SerialPart
auditContractNegotiation: false
bomLifecycle: asBuilt
collectAspects: false
Expand Down Expand Up @@ -1218,7 +1218,7 @@ components:
semanticId:
keys:
- type: ExternalReference
value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned
value: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt
type: ModelReference
- description:
- language: en
Expand Down Expand Up @@ -1283,7 +1283,7 @@ components:
parameter:
aspects:
- urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt
- urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
- urn:samm:io.catenax.serial_part:3.0.0#SerialPart
auditContractNegotiation: false
bomLifecycle: asBuilt
collectAspects: false
Expand Down Expand Up @@ -1341,7 +1341,7 @@ components:
semanticId:
keys:
- type: ExternalReference
value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned
value: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt
type: ModelReference
- description:
- language: en
Expand Down Expand Up @@ -1370,15 +1370,14 @@ components:
payload:
catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447
childItems:
- catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447
- businessPartner: BPNL00012345aNXY
catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447
createdOn: 2022-02-03T14:48:54.709Z
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
unit: unit:piece
value: 20.0
tombstones:
- catenaXId: urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0
endpointURL: https://catena-x.net/vehicle/partdetails/
Expand Down Expand Up @@ -1443,7 +1442,7 @@ components:
parameter:
aspects:
- urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt
- urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
- urn:samm:io.catenax.serial_part:3.0.0#SerialPart
auditContractNegotiation: false
bomLifecycle: asBuilt
collectAspects: false
Expand Down Expand Up @@ -1481,7 +1480,7 @@ components:
parameter:
aspects:
- urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt
- urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
- urn:samm:io.catenax.serial_part:3.0.0#SerialPart
auditContractNegotiation: false
bomLifecycle: asBuilt
collectAspects: false
Expand Down Expand Up @@ -1539,7 +1538,7 @@ components:
semanticId:
keys:
- type: ExternalReference
value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned
value: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt
type: ModelReference
- description:
- language: en
Expand Down Expand Up @@ -1568,15 +1567,14 @@ components:
payload:
catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447
childItems:
- catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447
- businessPartner: BPNL00012345aNXY
catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447
createdOn: 2022-02-03T14:48:54.709Z
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
unit: unit:piece
value: 20.0
tombstones:
- catenaXId: urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0
endpointURL: https://catena-x.net/vehicle/partdetails/
Expand All @@ -1601,7 +1599,7 @@ components:
parameter:
aspects:
- urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt
- urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
- urn:samm:io.catenax.serial_part:3.0.0#SerialPart
auditContractNegotiation: false
bomLifecycle: asBuilt
collectAspects: false
Expand Down
20 changes: 20 additions & 0 deletions docs/src/docs/arc42/building-block-view/level-2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,26 @@ include::../../../uml-diagrams/building-block-view/level-2-int-transfer-process-
|The ExecutorService enables the simultaneous execution of requests of transfer processes.
|===

== AASTransferProcessManager

The AASTransferProcessManager coordinates creation of Runnables which are then passed to the ExecutorService for asynchronous and parallel execution.
The Runnable consists of different Delegates which are each responsible for requesting certain types of data.

=== Component diagram
[plantuml, level-2-int-transfer-process-delegate, format=svg]
....
include::../../../uml-diagrams/building-block-view/level-2-int-transfer-process-delegate.puml[]
....

=== Component description
|===
|Components |Description
|DigitalTwinDelegate | Request the digital twin for the globalAssetId. The result is stored in "shells" of the job response.
|RelationshipDelegate| Request the payload for relationship aspects, found in the DTR. Relationships are mapped to the internal linkedItem data structure of IRS and validated to be within the supported major Traversal Aspect version range which can be found in the technical context.
The result is stored in "relationships" of the job response.
|SubmodelDelegate | Request the payload for the other semantic models requested by the Job. The result is stored in "submodels" of the job response.
|===

== ESS controller

The ESS REST controller is used to provide a RESTful web service to related Environmental and Social Standards functionalities.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/arc42/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
This work is licensed under the https://www.apache.org/licenses/LICENSE-2.0[Apache-2.0].

- SPDX-License-Identifier: Apache-2.0
- SPDX-FileCopyrightText: 2021, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
- SPDX-FileCopyrightText: 2021, 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
- SPDX-FileCopyrightText: 2022, 2023 BOSCH AG
- SPDX-FileCopyrightText: 2021, 2022 ZF Friedrichshafen AG
- SPDX-FileCopyrightText: 2022 ISTOS GmbH
- SPDX-FileCopyrightText: 2021, 2023 Contributors to the Eclipse Foundation
- SPDX-FileCopyrightText: 2021, 2024 Contributors to the Eclipse Foundation
- Source URL: https://github.com/eclipse-tractusx/item-relationship-service
12 changes: 6 additions & 6 deletions docs/src/docs/arc42/scope-context/technical-context.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ The integrated EDC client in the IRS is responsible for creating restful request

|===
| Name | Description |
| SingleLevelBomAsBuilt | The single-level bill of material represents one sub-level of an assembly and does not include any lower-level subassemblies. The as-built lifecycle references all child items as manufactured by the manufacturer referencing only child items in an as-built lifecycle themselves, unless parts can only be tracked by an part ID. If it's unclear which item has been built-in into the parent item, all potential parts must be listed. This is the case when, e.g. the same item is supplied by two suppliers and the item is only tracked by a customer part ID during assembly, these items can not be differentiated from each other. | 3.0.0
| SingleLevelUsageAsBuilt | The aspect provides the information in which parent part(s)/product(s) the given item is assembled in. Could be a 1:1 relationship in terms of a e.g. a brake component or 1:n for e.g. coatings. The given item as well as the parent item must refer to an object from as-built lifecycle phase, i.e. a batch or a serialized part. | 2.0.0
| SingleLevelBomAsBuilt | The single-level bill of material represents one sub-level of an assembly and does not include any lower-level subassemblies. The as-built lifecycle references all child items as manufactured by the manufacturer referencing only child items in an as-built lifecycle themselves, unless parts can only be tracked by an part ID. If it's unclear which item has been built-in into the parent item, all potential parts must be listed. This is the case when, e.g. the same item is supplied by two suppliers and the item is only tracked by a customer part ID during assembly, these items can not be differentiated from each other. | [2.0.0, 3.0.0]
| SingleLevelUsageAsBuilt | The aspect provides the information in which parent part(s)/product(s) the given item is assembled in. Could be a 1:1 relationship in terms of a e.g. a brake component or 1:n for e.g. coatings. The given item as well as the parent item must refer to an object from as-built lifecycle phase, i.e. a batch or a serialized part. | 3.0.0
|===

==== Semantic Model
Expand All @@ -52,14 +52,14 @@ The integrated EDC client in the IRS is responsible for creating restful request

|===
| Name | Description |
| SingleLevelBomAsPlanned | The single-level Bill of Material represents one sub-level of an assembly and does not include any lower-level subassemblies. In as planned lifecycle state all variants are covered (\"120% BoM\"). If multiple versions of child parts exist that can be assembled into the same parent part, all versions of the child part are included in the BoM. If there are multiple suppliers for the same child part, each supplier has an entry for their child part in the BoM.| 2.0.0
| SingleLevelUsageAsPlanned | The aspect provides the information in which parent part(s)/product(s) the given item is assembled in. This could be a 1:1 relationship in terms of a e.g. a brake component or 1:n for e.g. coatings. The given item as well as the parent item must refer to an object from as planned lifecycle phase. If multiple versions of parent parts exist that the child part can be assembled into, all versions of the parent part are included in the usage list. | Not supported
| SingleLevelBomAsPlanned | The single-level Bill of Material represents one sub-level of an assembly and does not include any lower-level subassemblies. In as planned lifecycle state all variants are covered (\"120% BoM\"). If multiple versions of child parts exist that can be assembled into the same parent part, all versions of the child part are included in the BoM. If there are multiple suppliers for the same child part, each supplier has an entry for their child part in the BoM.| [2.0.0, 3.0.0]
| SingleLevelUsageAsPlanned | The aspect provides the information in which parent part(s)/product(s) the given item is assembled in. This could be a 1:1 relationship in terms of a e.g. a brake component or 1:n for e.g. coatings. The given item as well as the parent item must refer to an object from as planned lifecycle phase. If multiple versions of parent parts exist that the child part can be assembled into, all versions of the parent part are included in the usage list. | 2.0.0
|===

==== Semantic Model
|===
| Name | Description |
| PartAsPlanned | A Part as Planned represents an item in the Catena-X Bill of Material (BOM) in As-Planned lifecycle status in a specific version. | [1.0,0, 1.0.1]
| PartAsPlanned | A Part as Planned represents an item in the Catena-X Bill of Material (BOM) in As-Planned lifecycle status in a specific version. | [1.0.0, 1.0.1]
| PartSiteInformationAsPlanned |The aspect provides site related information for a given as planned item (i.e. a part type or part instance that is uniquely identifiable within Catena-X via its Catena-X ID). A site is a delimited geographical area where a legal entity does business. In the \"as planned\" lifecycle context all potentially related sites are listed including all sites where e.g. production of this part (type) is planned. | 1.0.0
|===

Expand All @@ -68,7 +68,7 @@ The integrated EDC client in the IRS is responsible for creating restful request
==== Traversal Aspect
|===
| Name | Description |
| SingleLevelBomAsSpecified | The SingleLevelBomAsSpecified defines the view of the OEM or producer of the whole product, e.g. the OEM of a vehicle. It is free of any supplier-related information and specifies the promised and guaranteed content of the whole product to the end customer. This “top-down” view is in contrast to the “bottom-up” view of the SingleLevelBoMAsPlanned, though several sub-aspects are shared. The BomAsSpecified is merely one aspect, which is attached to the twin of the whole product and itself does neither introduce further twins nor reference them. Instead it merely comprises all functional information required by dismantlers, workshops or requestors for used parts to search for and to make a match on the market place. | 1.0.0
| SingleLevelBomAsSpecified | The SingleLevelBomAsSpecified defines the view of the OEM or producer of the whole product, e.g. the OEM of a vehicle. It is free of any supplier-related information and specifies the promised and guaranteed content of the whole product to the end customer. This “top-down” view is in contrast to the “bottom-up” view of the SingleLevelBoMAsPlanned, though several sub-aspects are shared. The BomAsSpecified is merely one aspect, which is attached to the twin of the whole product and itself does neither introduce further twins nor reference them. Instead it merely comprises all functional information required by dismantlers, workshops or requestors for used parts to search for and to make a match on the marketplace. | 2.0.0
|===

==== Semantic Model
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@startuml
skinparam monochrome true
skinparam shadowing false
skinparam nodesep 10
skinparam ranksep 100
skinparam linetype ortho
skinparam defaultFontName "Architects daughter"

component [**TransferProcessManagement**] <<Component>> as TransferProcessManagement {
component [**AASTransferProcessManager**] <<Component>> as TPM
component [**ExecutorService**] <<Component>> as executor
component [**Runnable**] <<Component>> as runnable {
component [**DigitalTwinDelegate**] <<Component>> as DTRDelegate
component [**RelationshipDelegate**] <<Component>> as RelDelegate
component [**SubmodelDelegate**] <<Component>> as SubDelegate
DTRDelegate -> RelDelegate
RelDelegate -> SubDelegate
}
TPM .. runnable
runnable ..> executor
}

[**DigitalTwinRegistryService**] <<Component>> as AASR
[**EdcSubmodelFacade**] <<Component>> as SMS

DTRDelegate ---(0 AASR
RelDelegate ---(0 SMS
SubDelegate ---(0 SMS

@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,14 @@ public class AASTransferProcessManager implements TransferProcessManager<ItemDat

private final AbstractDelegate abstractDelegate;

private final JsonUtil jsonUtil;

public AASTransferProcessManager(final AbstractDelegate abstractDelegate, final ExecutorService executor,
@Qualifier(JOB_BLOB_PERSISTENCE) final BlobPersistence blobStore) {
@Qualifier(JOB_BLOB_PERSISTENCE) final BlobPersistence blobStore, final JsonUtil jsonUtil) {
this.abstractDelegate = abstractDelegate;
this.executor = executor;
this.blobStore = blobStore;
this.jsonUtil = jsonUtil;
}

@Override
Expand Down Expand Up @@ -95,7 +98,6 @@ private Runnable getRunnable(final ItemDataRequest dataRequest,

private void storeItemContainer(final String processId, final ItemContainer itemContainer) {
try {
final JsonUtil jsonUtil = new JsonUtil();
blobStore.putBlob(processId, jsonUtil.asString(itemContainer).getBytes(StandardCharsets.UTF_8));
} catch (BlobPersistenceException e) {
log.error("Unable to store AAS result", e);
Expand Down
Loading

0 comments on commit a9077f0

Please sign in to comment.