Skip to content

Commit

Permalink
Merge pull request #982 from catenax-ng/feature/416-get-report-data-f…
Browse files Browse the repository at this point in the history
…rom-import

Feature/416 get report data from import
  • Loading branch information
ds-lcapellino authored Feb 15, 2024
2 parents 019ca20 + 55b137b commit 756723c
Show file tree
Hide file tree
Showing 34 changed files with 1,844 additions and 894 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Added
- added tombstone icon to parts table and error description in parts detail view
- Endpoint (assets/import/report/{importJobId}) for retrieving import report

### Changed
- actions/chache bumped from v3 to v4
Expand Down
3 changes: 3 additions & 0 deletions docs/src/docs/arc42/building-block-view/level-1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ include::../../../uml-diagrams/arc42/building-block-view/building-block-view.pum
|*RegistryController*
|The *RegistryController* provides a REST Interface for retrieving the data from parts registry.

|*ImportController*
|The *ImportController* provides a REST Interface for importing assets and publishing them in the Catena-X network.

|*AssetRepository*
|The *AssetRepository* is a component responsible for storing and getting assets from database.

Expand Down
4 changes: 4 additions & 0 deletions docs/src/docs/arc42/runtime-view/data-provisioning.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ The backend is able to persist the data in the DTR / EDC and allows to use IRS f
include::../../../uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml[]
....

TODO: Add all scenarios for data-provisioning

include::data-provisioning/return-import-report.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
= Scenario 1: Receive import report

This section describes what happens when the user wants to get a report of the imported assets associated to a importJobId.
In this example, the user requests an import report.

[plantuml,target=import-report-receive,format=svg]
....
include::../../../../uml-diagrams/arc42/runtime-view/data-provisioning/import-report-receive.puml[]
....

==== Overview

When a user requests an import report, TraceX-FOSS checks if the user has an adequate role ('ROLE_ADMIN', 'ROLE_SUPERVISOR').
If yes, then the endpoint returns an import report to the given importJobId.

If the importJobId is not known to Trace-X, an HTTP 404 error is returned.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
@startuml
skinparam monochrome true
skinparam shadowing false
autonumber "<b>[000]"

actor TraceXApiConsumer
activate TraceXApiConsumer

box "Trace-X FOSS" #LightGrey
participant TraceXAPI
activate TraceXAPI
participant ImportController
activate ImportController
participant ImportService
activate ImportService
participant ImportJobRepository
activate ImportJobRepository
participant JpaImportJobRepository
activate JpaImportJobRepository
database TracexDatabase

TraceXApiConsumer -> TraceXAPI : GET /assets/import/report/{importJobId}
TraceXAPI -> ImportController : getImportReport
ImportController -> ImportService : getImportJob(importJobId)
ImportService -> ImportJobRepository: getImportJob(importJobId)
ImportJobRepository -> JpaImportJobRepository: getReferenceById(importJobId)
JpaImportJobRepository -> TracexDatabase : find import job with associated assets

JpaImportJobRepository <-- TracexDatabase
ImportJobRepository <-- JpaImportJobRepository
ImportService <-- ImportJobRepository
ImportController <-- ImportService
TraceXAPI <-- ImportController
TraceXApiConsumer <-- TraceXAPI : map ImportJob to ImportReportResponse




@enduml
Loading

0 comments on commit 756723c

Please sign in to comment.