Introduction¶
Deprecated
This tutorial is kept for reference. It may not match the current Eclipse Tractus-X release. All tutorials
This guide explains the Item Relationship Service (IRS) plugin which provides a simple way to access the drill down components of digital product pass in an item tree representation, enabling data chains along the value chain in the industry. The below diagram shows the interaction of DPP consumer app and IRS plugin to fetch the component relationships. In this tutorial, it is optional to get the relationships of components.
___________________ __________________
| | | |
| DPP CONSUMER APP | <---> | IRS |
|___________________| |__________________|
Component Hierarchy¶
To make it easily understandable, lets consider an example of a car battery. A battery consists of battery module and a module further contains a battery cell. In this way, each level of component can have its own passport.
___________________
| |
| Battery |
|___________________|
|
| ___________________
|--->| |
| Battery Module |
|___________________|
|
| ___________________
|--->| |
| Battery Cell |
|___________________|
Prerequisites¶
You must have the following components up and running:
- A Data Service (DS) to store component relationships in a plain JSON
- Digital Twin Registry (DTR) to attach SingleLevelBomAsBuilt submodel to existing Digital Twins
- A preconfigured data consumer conenctor with IRS plugin enabled
- Accessibility of components over the network
1° Generate the Ids¶
Please generate two UUIDs from the UUID generator https://www.uuidgenerator.net/
BOMAsBuiltID¶
Generate BOMAsBuiltID using the following format
SerialPartID¶
Generate SerialPartID using the following format
Store these IDs in some notepad editor for later use.2° Lookup BOMAsBuilt Relationships of the Component¶
To find your part and be able to copy and paste the information:
1 - Go to the file bomAsBuiltRelationships
2 - Search by uuid with CTRL + F:
Tip
You will get the UUID in the paper or here
Example:
{
"catenaXId": "urn:uuid:48acc23b-7cb8-4288-b620-9eb3d9dce6bf",
"childItems": [
{
"catenaXId": "urn:uuid:f10c0181-ce80-4139-81f0-a59226c88bfe",
"quantity": {
"value": 1.0,
"unit": "unit:piece"
},
"hasAlternatives": false,
"createdOn": "2022-02-03T14:48:54.709Z",
"businessPartner": "BPNL00000003B2OM",
"lastModifiedOn": "2022-02-03T14:48:54.709Z"
},
{
"catenaXId": "urn:uuid:12e656bb-948e-44eb-9b5e-88d7deedf388",
"quantity": {
"value": 1.0,
"unit": "unit:piece"
},
"hasAlternatives": false,
"createdOn": "2022-02-03T14:48:54.709Z",
"businessPartner": "BPNL00000003B2OM",
"lastModifiedOn": "2022-02-03T14:48:54.709Z"
}
]
}
3 - Copy the json content and store it into the notepad editor in json format for later use.
Tip
Copy and paste the data for creating your digital product pass faster!
3° Add BOMAsBuilt Payload to the Submodel Server¶
The BOMAsBuilt relationships, you stored temporarily in your notepad editor from step 2 must be added into the submodel data service.
Important
Please substitute the BOMAsBuiltID that was generated in step 1
Caution
Please dont re-use uuids.
Open a new terminal and run the following command to add your data into the data service:
POST /<
BOMAsBuiltID>
Windows
Click to see the Windows command
Mac & Linux
Click here to see the Mac & Linux command
Tip
The placeholder
Verify your data is registerd in the service
GET /<
BOMAsBuiltID>
Windows
Click to see the Windows command
Mac & Linux
Click here to see the Mac & Linux command
4° Lookup SerialPart Item of the Component¶
To find serial part and be able to copy and paste the information:
1 - Go to the file serialPartItems
2 - Search by uuid with CTRL + F:
Tip
You will get the UUID in the paper or here
Example:
{
"urn:uuid:c28098f6-6996-4a77-be8d-497fd9f60fc6": {
"localIdentifiers": [
{
"value": "BFH-4459",
"key": "partInstanceId"
}
],
"manufacturingInformation": {
"date": "2022-02-04T14:48:54",
"country": "DE"
},
"catenaXId": "urn:uuid:c28098f6-6996-4a77-be8d-497fd9f60fc6",
"partTypeInformation": {
"manufacturerPartId": "MPI0012",
"customerPartId": "BFH-4459",
"classification": "product",
"nameAtManufacturer": "CHASSIS",
"nameAtCustomer": "CHASSIS"
}
}
}
3 - Copy the json content and store it into the notepad editor in json format for later use.
5° Add SerialPart Item to the Submodel Server¶
The serial part data, you stored temporarily in your notepad editor from step 4 must be added into the submodel data service.
Important
Please substitute the SerialPartID that was generated in step 1
Caution
Please dont re-use uuids.
Open a new terminal and run the following command to add your data into the data service:
POST /<SerialPartID
>
Windows
Click to see the Windows command
Mac & Linux
Click here to see the Mac & Linux command
Tip
The placeholder
Verify your data is registerd in the service
GET /<SerialPartID
>
Windows
Click to see the Windows command
Mac & Linux
Click here to see the Mac & Linux command
6° Add BOMAsBuilt and SerialPart to Existing Digital Twin¶
- To get the existing digital twin, get your part Id from the given paper and encode it into Base64.
The digital twin registered can be checked/verified from the following command:
Important
The
Example:
Digital Twin Id: 3f89d0d4-e11c-f83b-16fd-733c63d4e121
Base64 Encoded: M2Y4OWQwZDQtZTExYy1mODNiLTE2ZmQtNzMzYzYzZDRlMTIx
GET /shell-descriptors/
Windows
Click to see the Windows command
Mac & Linux
Click here to see the Mac & Linux command
Example JSON response:
{
"description": [],
"displayName": [],
"id": "a530baad-77ad-4ffc-a925-f3a207839791",
"specificAssetIds": [
{
"name": "manufacturerPartId",
"value": "MPI7654",
"externalSubjectId": {
"type": "ExternalReference",
"keys": [
{
"type": "GlobalReference",
"value": "PUBLIC_READABLE"
}
]
}
}
],
"submodelDescriptors": [
{
"endpoints": [
{
"interface": "SUBMODEL-3.0",
"protocolInformation": {
...
}
}
],
"idShort": "digitalProductPass",
"id": "urn:uuid:d2e47115-c430-4145-bbde-1c743804a379",
...
}
]
}
-
Search for the
submodelDescriptorsarray. We need to add more elements to the submodelDescriptors array. -
Copy your response and add the following json content into the submodelDescriptors array:
Important
Please ensure that each Id attribute must contain the urn:uuid as prefix. The Digital Twin Id is an exception.
{
"endpoints": [
{
"interface": "SUBMODEL-3.0",
"protocolInformation": {
"href": "<EDC_DATAPLANE_URL>/api/public/<BOMAsBuiltID>",
"endpointProtocol": "HTTP",
"endpointProtocolVersion": ["1.1"],
"subprotocol": "DSP",
"subprotocolBody": "id=urn:uuid:0c3d2db0-e5c6-27f9-5875-15a9a00e7a27;dspEndpoint=<EDC_CONTROLPLANE_URL>",
"subprotocolBodyEncoding": "plain",
"securityAttributes": [
{
"type": "NONE",
"key": "NONE",
"value": "NONE"
}
]
}
}
],
"idShort": "singleLevelBomAsBuilt",
"id": "<BOMAsBuiltID>",
"semanticId": {
"type": "ExternalReference",
"keys": [
{
"type": "Submodel",
"value": "urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt"
}
]
},
"description": [
{
"language": "en",
"text": "DPP singleLevelBOMAsBuilt Submodel"
}
],
"displayName": []
},
{
"endpoints": [
{
"interface": "SUBMODEL-3.0",
"protocolInformation": {
"href": "<EDC_DATAPLANE_URL>/api/public/<serialPartID>",
"endpointProtocol": "HTTP",
"endpointProtocolVersion": ["1.1"],
"subprotocol": "DSP",
"subprotocolBody": "id=urn:uuid:0c3d2db0-e5c6-27f9-5875-15a9a00e7a27;dspEndpoint=<EDC_CONTROLPLANE_URL>",
"subprotocolBodyEncoding": "plain",
"securityAttributes": [
{
"type": "NONE",
"key": "NONE",
"value": "NONE"
}
]
}
}
],
"idShort": "serialPart",
"id": "<serialPartID>",
"semanticId": {
"type": "ExternalReference",
"keys": [
{
"type": "Submodel",
"value": "urn:samm:io.catenax.serial_part:3.0.0#SerialPart"
}
]
},
"description": [
{
"language": "en",
"text": "DPP serial part Submodel"
}
],
"displayName": []
}
- Substitute the corresponding placeholders <BOMAsBuiltID
> and <SerialPart> with their Ids generated in step 1.
Important
<EDC_CONTROLLANE_URL> and <EDC_DATAPLANE_URL> are given in a paper
Caution
Please make sure that you substitute all the placeholders with their values
-
Search for the
supplementalSemanticIdkeyword (if any) and remove that line. -
Save your changes to a json file.
Update Digital Twin with BOMAsBuilt and SerialPart Submodels¶
Update the digital twin submodel using the following command:
PUT /shell-descriptors/
Windows
Click to see the Windows command
Mac & Linux
Click here to see the Mac & Linux command
Congratulations, you have successfully attached BOMAsBuilt relationships and serial part to the existing Digital Twin object.