Skip to content

Commit

Permalink
Merge pull request eclipse-tractusx#635 from catenax-ng/feature/TRI-2…
Browse files Browse the repository at this point in the history
…03-ess-building-block

Feature/tri 203 ess building block
  • Loading branch information
ds-ext-kmassalski authored Nov 14, 2023
2 parents 2c1d9e1 + 2bf253f commit 2cdd841
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 10 deletions.
7 changes: 7 additions & 0 deletions docs/src/docs/arc42/building-block-view/irs-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ Since we cannot rely on synchronous responses regarding the requests of submodel
....
include::../../../uml-diagrams/api-specification/irs-api-interaction.puml[]
....

== ESS Investigation interaction diagram

[plantuml, target=ess-api, format=svg]
....
include::../../../uml-diagrams/api-specification/ess-api-interaction.puml[]
....
10 changes: 7 additions & 3 deletions docs/src/docs/arc42/building-block-view/level-1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ A job is processed in this order:
5. Recursively iteration over step 2-4 until an abort criterion is reached.
6. Assembles the complete item graph.

|*Policy Store*
|The *Policy Store* provides an Interface for getting, adding and deleting accepted IRS EDC policies. These policies will be used to validate EDC contract offers.

|*BlobStore*
|The BlobStore is the database where the relationships and tombstones are stored for a requested item.

Expand All @@ -60,4 +57,11 @@ A job is processed in this order:

|*EDC Client*
|The EDC Client is used to communicate with the EDC network, negotiate contracts and retrieve submodel data.

|*EssController*
|The *EssController* provides a REST Interface to perform BPN investigations of supply chain.

|*PolicyStoreController*
|The *PolicyStoreController* provides a REST Interface for getting, adding and deleting accepted IRS EDC policies. These policies will be used to validate EDC contract offers.

|===
30 changes: 30 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 @@ -63,6 +63,7 @@ include::../../../uml-diagrams/building-block-view/level-2-int-recursive-job-han
|Interface for storing data blobs.
|===


== TransferProcessManagement

The TransferProcessManager creates executions and provides them to the executor service. Each execution contains HTTP requests to the asset administration shell registry and to the submodel interface.
Expand Down Expand Up @@ -95,4 +96,33 @@ include::../../../uml-diagrams/building-block-view/level-2-int-transfer-process-

|ExecutorService
|The ExecutorService enables the simultaneous execution of requests of transfer processes.
|===

== ESS controller

The ESS REST controller is used to provide a RESTful web service to related Environmental and Social Standards functionalities.

=== Component diagram

[plantuml, target=level-2-ess-controller, format=svg]
....
include::../../../uml-diagrams/building-block-view/level-2-int-ess.puml[]
....

=== Component description

|===
|Components |Description

|EssService
|Service contains business logic for investigation if part is inside supply chain.

|IrsItemGraphQueryService
|Service for retrieving item graph.

|BpnInvestigationJobCache
|Interface for storing incident data blobs.

|EssRecursiveNotificationHandler
|Business logic handling recursive investigation and results calculation. Responsible for sending and receiving EDC notifications.
|===
34 changes: 34 additions & 0 deletions docs/src/uml-diagrams/api-specification/ess-api-interaction.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@startuml
skinparam monochrome true
skinparam shadowing false
skinparam linetype ortho
skinparam defaultFontName "Architects daughter"

actor APIConsumer
activate APIConsumer

box "IRS" #LightBlue
participant WebService as "ESS API"
activate WebService

APIConsumer -> WebService : POST /ess/bpn/investigations
opt
APIConsumer <-- WebService : 201: Returns jobId of registered Investigation job.

loop poll is "200" http
APIConsumer -> WebService : GET /ess/bpn/investigations/{jobId}

opt job.hasCompleted()
APIConsumer <-- WebService : "200" Item Graph for given jobId with additional supplyChainImpacted information.
else job.isRunning()
APIConsumer <-- WebService : "200" Item Graph for given jobId with partial results about supplyChainImpacted information.
end opt
end loop

else
APIConsumer <-- WebService : 400: Registering Investigation job failed.
end opt



@enduml
19 changes: 12 additions & 7 deletions docs/src/uml-diagrams/building-block-view/building-block-view.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ skinparam defaultFontName "Architects daughter"
component [**IRS-Application**] <<System>> as IRS {
component [**RecursiveJobHandler**] <<Component>> as RecursiveJobHandler
component [**IrsController**] <<Component>> as IrsController
component [**PolicyStoreController**] <<Component>> as PolicyStoreController
component [**EssController**] <<Component>> as EssController
component [**JobOrchestrator**] <<Component>> as JobOrchestrator
component [**TransferProcessManagment**] <<Component>> as TransferProcessManagement
component [**Policy Store**] <<Component>> as PolicyStore
component [**TransferProcessManagement**] <<Component>> as TransferProcessManagement

port "IRS API" as API_PORT

port "API" as API_PORT
port "Digital Twin Client" as AAS_PORT
port "EDC Client" as EDC_PORT

Expand All @@ -23,18 +25,21 @@ skinparam defaultFontName "Architects daughter"
JobOrchestrator <..> TransferProcessManagement
JobOrchestrator <..> RecursiveJobHandler
TransferProcessManagement --( StoreInterface
PolicyStore --( StoreInterface
PolicyStore <..> TransferProcessManagement
IrsController <..> PolicyStore

PolicyStoreController -( StoreInterface
EssController <..> JobOrchestrator

}
component [**Digital Twin Registry**] <<System>> as DTR
component [**EDC**] <<System>> as EDC
actor IrsApiConsumer
actor EssApiConsumer
actor PolicyStoreApiConsumer
IrsController -up- API_PORT
PolicyStoreController -down- API_PORT
EssController -down- API_PORT
IrsApiConsumer -(0- API_PORT
EssApiConsumer -(0- API_PORT
PolicyStoreApiConsumer -(0- API_PORT


TransferProcessManagement --- AAS_PORT
Expand Down
24 changes: 24 additions & 0 deletions docs/src/uml-diagrams/building-block-view/level-2-int-ess.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@startuml
skinparam monochrome true
skinparam shadowing false
skinparam linetype ortho
skinparam defaultFontName "Architects daughter"

component [**EssController**] <<System>> as EssController {
component [**EssService**] <<Component>> as EssService
component [**EssRecursiveNotificationHandler**] <<Component>> as EssRecursiveNotificationHandler
component [**IrsItemGraphQueryService**] <<Component>> as IrsItemGraphQueryService
port "ESS API" as API_PORT
interface BpnInvestigationJobCache

EssService <.> IrsItemGraphQueryService
EssService <..> EssRecursiveNotificationHandler
EssService --( BpnInvestigationJobCache

}

actor EssApiConsumer
EssService -up- API_PORT
EssApiConsumer -(0- API_PORT

@enduml

0 comments on commit 2cdd841

Please sign in to comment.