Skip to content

Commit

Permalink
Merge pull request #171 from catenax-ng/cx_documentation_24.05
Browse files Browse the repository at this point in the history
doc | sde documentation 24.05
  • Loading branch information
almadigabor authored May 13, 2024
2 parents 6079f20 + 151599c commit c0c642a
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 23 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Dt access api use in digital twin processing.
- Added test cases for PCF and policy controller.
- Refactor code to make stable release
- Documentation updated

### Fixed
- Remove garbage character from 'edc_request_template' path. Fixed [#147](https://github.com/eclipse-tractusx/managed-simple-data-exchanger-backend/issues/147).
Expand Down
16 changes: 16 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ Apart from both upload Batch upload is additional feature were added into DFT.
4. Create Asset in EDC Connector.
5. Stores the line in the database.

<b>For PartTypeInformation Upload:</b>

1. Maps the content of the line with an PartTypeInformation.
2. Generates the UUID if it does not contain a UUID.
3. Registers in DigitalTwins.
4. Create Asset in EDC Connector.
5. Stores the line in the database.

<b>For SingleLevelBoMAsPlanned Upload:</b>

1. Maps the content of the line with an SingleLevelBoMAsPlanned.
Expand All @@ -112,6 +120,14 @@ Apart from both upload Batch upload is additional feature were added into DFT.
4. Create Asset in EDC Connector.
5. Stores the line in the database.

<b>For Pcf Upload:</b>

1. Maps the content of the line with an Pcf.
2. checks if an PartAsPlanned Aspect exists so it can be related to that Aspect.
3. Registers in DigitalTwins.
4. Create Asset in EDC Connector.
5. Stores the line in the database.

The file .csv is loaded in memory, the content is saved and then, the file is removed from memory.


Expand Down
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Listed below are configuration keys needed to get the `sde-backend` up and runni
| discovery.clientSecret | X | default | discovery clientSecret |
| discovery.grantType | X | default | discovery grantType |
| partner.pool.hostname | X | default | partner pool hostname |
| partner.pool.authentication.url | X | default | partner pool authentication url |
| partner.pool.authentication.url | X | default | partner pool authentication url |
| partner.pool.clientId | X | default | partner pool clientId |
| partner.pool.clientSecret | X | default | partner pool clientSecret |
| partner.pool.grantType | X | default | partner pool grantType |
Expand All @@ -96,6 +96,12 @@ Listed below are configuration keys needed to get the `sde-backend` up and runni
| portal.backend.clientId | X | default | portal clientId |
| portal.backend.clientSecret | X | default | portal clientSecret |
| portal.backend.grantType | X | default | portal grantType |
| policy.hub.hostname | X | default | policy hub hostname |
| policy.hub.authentication.url | X | default | policy hub authentication url |
| policy.hub.clientId | X | default | policy hub clientId |
| policy.hub.clientSecret | X | default | policy hub clientSecret |
| policy.hub.grantType | X | default | policy hub grantType |


#### Example Configuration/application.properties

Expand Down Expand Up @@ -206,6 +212,11 @@ portal.backend.authentication.url=default
portal.backend.clientId=default
portal.backend.clientSecret=default
portal.backend.grantType=default
policy.hub.hostname=default
policy.hub.authentication.url=default
policy.hub.clientId=default
policy.hub.clientSecret=default
policy.hub.grantType=default
```

The above configuration we can use as for different deployment as specified here [InstallationGuide.md](InstallationGuide.md)
Expand All @@ -222,6 +233,7 @@ To find information about supported submodules and there version in SDE please v
* SingleLevelBoMAsBuilt
* Batch
* PartAsPlanned
* PartTypeInformation
* SingleLevelBoMAsPlanned
* PartSiteInformationAsPlanned
* SingleLevelUsageAsBuilt
Expand All @@ -231,6 +243,7 @@ To find information about supported submodules and there version in SDE please v
* SingleLevelBoMAsBuilt
* Batch
* PartAsPlanned
* PartTypeInformation
* SingleLevelBoMAsPlanned
* PartSiteInformationAsPlanned
* SingleLevelUsageAsBuilt
Expand All @@ -240,6 +253,7 @@ To find information about supported submodules and there version in SDE please v
* SingleLevelBoMAsBuilt
* Batch
* PartAsPlanned
* PartTypeInformation
* SingleLevelBoMAsPlanned
* PartSiteInformationAsPlanned
* SingleLevelUsageAsBuilt
Expand Down Expand Up @@ -288,6 +302,16 @@ To find information about supported submodules and there version in SDE please v
| **GET:- localhost:8080/api/contract-offers** |This API is used to get all contract offers | Refer Api Doc |Refer Api Doc|
| **GET:- localhost:8080/api/legal-entities** |This API is used to fetch legal entities (list of company's) for Process| Refer Api Doc |Refer Api Doc|
| **POST:- localhost:8080/api/connectors-discovery** |This API is used to fetch connectors information | Refer Api Doc |Refer Api Doc|
| **GET:- localhost:8080/api/policy-attributes** |This API is used to fetch policy attributes | Refer Api Doc |Refer Api Doc|
| **GET:- localhost:8080/api/policy-types** |This API is used to fetch type of policy attributes | Refer Api Doc |Refer Api Doc|
| **GET:- localhost:8080/api/policy-content** |This API is used to fetch policy content | Refer Api Doc |Refer Api Doc|
| **POST:- localhost:8080/api/policy-content** |This API is used to create policy content | Refer Api Doc |Refer Api Doc|
| **POST:- localhost:8080/api/policy** |This API is used to save policy | Refer Api Doc |Refer Api Doc|
| **PUT:- localhost:8080/api/policy/{uuid}** |This API is used to update policy | Refer Api Doc |Refer Api Doc|
| **GET:- localhost:8080/api/policy/{uuid}** |This API is used to get policy | Refer Api Doc |Refer Api Doc|
| **GET:- localhost:8080/api/policy/is-policy-name-valid** |This API is used to check policy name valid or not | Refer Api Doc |Refer Api Doc|
| **GET:- localhost:8080/api/policy** |This API is used to all policy | Refer Api Doc |Refer Api Doc|
| **DELETE:- localhost:8080/api/policy/{uuid}** |This API is used to delete policy | Refer Api Doc |Refer Api Doc|

## Detailed API specs available under:

Expand Down Expand Up @@ -326,10 +350,16 @@ https://<host-url>/backend/api/swagger-ui/index.html
| Tables | Description | Unique Id |
| ------ | ------ | ------ |
| **aspect** | Table used to Store Date About Serialized Part | **Primary Key**:UUID |
| **serialpart_v_300** | Table used to Store Date About Serialized Part | **Primary Key**:UUID |
| **aspect_relationship** |Data about the relationship of parts to its child-components. | **Primary Key**:parent_catenax_id, child_catenax_id |
| **single_level_bom_asbuilt_v_300** |Data about the relationship of parts to its child-components. | **Primary Key**:parent_catenax_id, child_catenax_id |
| **batch** |Table used to Store Date about Serialized Part. | **Primary Key**:UUID |
| **batch_v_300** |Table used to Store Date about Serialized Part. | **Primary Key**:UUID |
| **part_as_planned** |Table used to Store Date about Part As Planned. | **Primary Key**:UUID |
| **part_type_information** |Table used to Store Date about Part As Planned. | **Primary Key**:UUID |
| **pcf_aspect** |Table used to Store Date about Part As Planned. | **Primary Key**:UUID |
| **single_level_bom_as_planned** |Data about the relationship of part As Planned to its child-components. | **Primary Key**:parent_catenax_id, child_catenax_id |
| **single_level_bom_as_planned_v_300** |Data about the relationship of part As Planned to its child-components. | **Primary Key**:parent_catenax_id, child_catenax_id |
| **part_site_information_as_planned** |Table used to Store Date about Part Site Information As Planned. | **Primary Key**:UUID |
| **contract_negotiation_info** |Tables Contains Contract Negotiation Info and offerid | **Primary Key**: connector_id, offer_id |
| **failure_log** |Table Contains Data About Failure Entries | **Primary Key**:UUID |
Expand All @@ -339,6 +369,7 @@ https://<host-url>/backend/api/swagger-ui/index.html
| **sde_permission** |Table Contains list of permissions | **Primary Key**:sde_permission |
| **sde_role_permission_mapping** |Table Contains mapping of role with permissions | **Primary Key**:sde_role, sde_permission |
| **single_level_usage_as_built** |Data about the relationship of parts to its child-components. | **Primary Key**:parent_catenax_id, child_catenax_id |
| **single_level_usage_as_built_v_300** |Data about the relationship of parts to its child-components. | **Primary Key**:parent_catenax_id, child_catenax_id |

---
## flyway
Expand Down
9 changes: 6 additions & 3 deletions modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ SDE backend splited into multiple services loosely-coupled Maven modules.
- modules/sde-external-services/digital-twins
- modules/sde-external-services/portal
- modules/sde-external-services/bpn-discovery
- modules/sde-external-services/policy-hub

- modules/sde-common
- modules/sde-core
- modules/sde-submodules/serial-part-typization

- modules/sde-submodules/serial-part
- modules/sde-submodules/single-level-bom-as-built
- modules/sde-submodules/batch
- modules/sde-submodules/assembly-part-relationship
- modules/sde-submodules/part-as-planned
- modules/sde-submodules/part-type-information
- modules/sde-submodules/part-site-information-as-planned
- modules/sde-submodules/single-level-usage-as-built
- modules/sde-submodules/single-level-bom-as-planned
- modules/sde-submodules/pcf
- modules/sde-usecases/traceability
- modules/pcf-exchange
3 changes: 2 additions & 1 deletion modules/pcf-exchange/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ https://eclipse-tractusx.github.io/docs-kits/category/pcf-exchange-kit
##### External service dependency :
- dDTR service.
- EDC Service.
- BPN Discovery.
- BPN Discovery.
- Portal Service.
3 changes: 2 additions & 1 deletion modules/sde-external-services/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ Currenlty SDE consume below Downstearm services API's to perform the Asset creat
- edc
- digital-twins
- portal
- bpn-discovery
- bpn-discovery
- policy-hub
2 changes: 1 addition & 1 deletion modules/sde-external-services/digital-twins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ This is maven package build to call DT API's to create simantic twins/aspects in

This module contain all implementation related to DigitalTwins registry api's call.

Swagger Link: https://semantics.int.demo.catena-x.net/registry/swagger-ui/index.html
Swagger Link: https://<host-url>/registry/swagger-ui/index.html


Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private void preparePolicyConstraint(List<ConstraintRequest> policies, Policies
private List<String> getAndOwnerBPNIfNotExist(Policies policy, List<String> values) {

if (policy.getTechnicalKey().equals(BUSINESS_PARTNER_NUMBER) && !values.isEmpty()
&& !values.contains(manufacturerId) && (values.size() == 1 && !values.get(0).equals(""))) {
&& (values.size() == 1 && StringUtils.isNotBlank(values.get(0))) && !values.contains(manufacturerId)) {

List<String> temp = new ArrayList<>();
values.stream().forEach(temp::add);
Expand Down
42 changes: 27 additions & 15 deletions modules/sde-submodules/submodules.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SDE Submodules
# SDE Submodules
---
## Description
This is maven package mainly build for supporting different semantic submodels like SerialPartTypization, Batch, AssemblyPartRelationship etc.
Expand All @@ -8,14 +8,19 @@ Currently SDE supports below submodels.

### Supported Models

#### [serial-part-typization in Version 1.1.1]
#### [serial-part in Version 1.0.0]
#### [serial-part in Version 3.0.0]
#### [batch in Version 2.0.0]
#### [assembly-part-relationship in Version 1.1.1]
#### [partAsPlanned in Version 1.0.0]
#### [PartTypeInformation in Version 1.0.0]
#### [singleLevelBoMAsPlanned in Version 1.0.1]
#### [partSiteInformationAsPlanned in Version 1.0.0]
#### [SingleLevelUsageAsBuilt in Version 1.0.1]
#### [batch in Version 3.0.0]
#### [single-level-bom-as-built in Version 1.0.0]
#### [single-level-bom-as-built in Version 3.0.0]
#### [part-as-planned in Version 1.0.0]
#### [part-type-information in Version 1.0.0]
#### [part-site-information-as-planned in Version 1.0.0]
#### [single-level-bom-as-planned in Version 1.0.1]
#### [single-level-bom-as-planned in Version 3.0.0]
#### [Single-level-usage-as-built in Version 1.0.1]
#### [Single-level-usage-as-built in Version 3.0.0]
#### [Product Carbon Footprint(PCF) in Version 6.0.0]

### How we can add Submodels?
Expand All @@ -37,11 +42,18 @@ Once your maven module ready just do the clean build and install so submodel wil



[serial-part-typization in Version 1.1.1]: serial-part-typization/serial-part-typization.md
[serial-part in Version 1.0.0]: serial-part/serial-part.md
[serial-part in Version 3.0.0]: serial-part/serial-part.md
[batch in Version 2.0.0]: batch/batch.md
[assembly-part-relationship in Version 1.1.1]: assembly-part-relationship/assembly-part-relationship.md
[partAsPlanned in Version 1.0.0]: part-as-planned/part-as-planned.md
[singleLevelBoMAsPlanned in Version 1.0.1]: single-level-bom-as-planned/single-level-bom-as-planned.md
[partSiteInformationAsPlanned in Version 1.0.0]: part-site-information-as-planned/part-site-information-as-planned.md
[SingleLevelUsageAsBuilt in Version 1.0.1]: single-level-usage-as-built/single-level-usage-as-built.md
[Product Carbon Footprint(PCF) in Version 6.0.0]: pcf/pcf.md
[batch in Version 3.0.0]: batch/batch.md
[single-level-bom-as-built in Version 1.0.0]: single-level-bom-as-built/single-level-bom-as-built.md
[single-level-bom-as-built in Version 3.0.0]: single-level-bom-as-built/single-level-bom-as-built.md
[part-as-planned in Version 1.0.0]: part-as-planned/part-as-planned.md
[part-type-information in Version 1.0.0]: part-type-information/part-type-information.md
[part-site-information-as-planned in Version 1.0.0]: part-site-information-as-planned/part-site-information-as-planned.md
[single-level-bom-as-planned in Version 1.0.1]: single-level-bom-as-planned/single-level-bom-as-planned.md
[single-level-bom-as-planned in Version 3.0.0]: single-level-bom-as-planned/single-level-bom-as-planned.md
[Single-level-usage-as-built in Version 1.0.1]: Single-level-usage-as-built/Single-level-usage-as-built.md
[Single-level-usage-as-built in Version 3.0.0]: Single-level-usage-as-built/Single-level-usage-as-built.md
[Product Carbon Footprint(PCF) in Version 6.0.0] pcf/pcf.md

0 comments on commit c0c642a

Please sign in to comment.