From 23b7f1c66998329c9c6030c7228e554eda709bf1 Mon Sep 17 00:00:00 2001 From: mk Date: Tue, 23 Jul 2024 16:16:12 +0200 Subject: [PATCH] chore(docu):;[#1108] correct Request Contract Agreements flow --- .../get-contract-sequenceflow.puml | 85 ++++++++++--------- .../data-sovereignty/policy-management.adoc | 2 +- 2 files changed, 47 insertions(+), 40 deletions(-) diff --git a/docs/concept/#638-contractagreement-admin-view/get-contract-sequenceflow.puml b/docs/concept/#638-contractagreement-admin-view/get-contract-sequenceflow.puml index 58f7d17114..b3b8a088a9 100644 --- a/docs/concept/#638-contractagreement-admin-view/get-contract-sequenceflow.puml +++ b/docs/concept/#638-contractagreement-admin-view/get-contract-sequenceflow.puml @@ -1,47 +1,54 @@ @startuml title - ==GET api/contracts/{tx-assetId} + == Request Contract Agreements end title autonumber "[00]" - -participant "Trace-X Frontend" as FE order 0 -participant "Trace-X Backend" as BE order 1 -participant "Trace-X Database" as DB order 2 -participant "EDC" as TXEDC order 3 - -FE -> BE: GET api/contracts/{tx-assetId} - -activate BE -BE -> DB: Take contractAgreementId for tx-assetId -activate DB -autonumber stop -DB --> BE: contractAgreementId -autonumber resume -deactivate DB - -BE -> TXEDC: GET tx-edc/management/v2/contractagreements/{contractAgreementId} -activate TXEDC -autonumber stop -TXEDC --> BE: JSON response -autonumber resume -deactivate TXEDC -BE -> BE: Extract contractSigningDate, policy -activate BE +skinparam monochrome true +skinparam shadowing false +skinparam defaultFontName "Architects daughter" +skinparam linetype ortho + +participant "Trace-X \n Frontend" as FE order 0 +participant "Trace-X \n Backend" as BE order 1 +participant "Trace-X \n Database" as DB order 2 +participant "EDC \n ManagementAPI" as TXEDC order 3 + +FE -> BE: Request for ContractResponse +note left + GET /contracts by filterExpression +end note + +loop for each contract agreement + activate BE + BE -> DB: Query contractAgreementId for assetId + activate DB + DB --> BE: result contractAgreementId + deactivate DB + + BE -> TXEDC: GET contractagreements + note left + GET edc/management/v2/contractagreements/{contractAgreementId} + end note + activate TXEDC + TXEDC --> BE: return contract agreements + deactivate TXEDC + BE -> BE: Extract contractSigningDate, policy + activate BE + deactivate BE + + BE -> TXEDC: GET edc/management/v2/contractagreements/{contractAgreementId}/negotiation + activate TXEDC + TXEDC --> BE: Gets a contract negotiation with the given contract agreement ID + deactivate TXEDC + BE -> BE: Extract id, counterPartyAddress, state + activate BE + BE -> BE : Create ContractResponse + deactivate BE + +end loop + +BE --> FE: List of ContractResponses for filterExpression deactivate BE - -BE -> TXEDC: GET tx-edc/management/v2/contractagreements/{contractAgreementId}/negotiation -activate TXEDC -autonumber stop -TXEDC --> BE: JSON response -autonumber resume -deactivate TXEDC -BE -> BE: Extract id, counterPartyAddress, state -activate BE -deactivate BE - autonumber stop -BE --> FE: JSON response -deactivate BE - @enduml diff --git a/docs/src/docs/arc42/runtime-view/data-sovereignty/policy-management.adoc b/docs/src/docs/arc42/runtime-view/data-sovereignty/policy-management.adoc index 874834df0c..ba973c2246 100644 --- a/docs/src/docs/arc42/runtime-view/data-sovereignty/policy-management.adoc +++ b/docs/src/docs/arc42/runtime-view/data-sovereignty/policy-management.adoc @@ -146,7 +146,7 @@ If no policies are configured for the receiving BPN and a notification is sent t include::../../../../uml-diagrams/arc42/runtime-view/data-sovereignty/data-sovereignty-notifications-policy-expired.puml[] .... -Policies always have an expiration time. When a notification is sent and there are policies configured for the selected BPN with an expiration time in the past, Trace-X will throw an error. In that case, an administrator must either update the policy. Then the policy can be resent. +Policies always have an expiration time defined by the 'validUntil' timestamp. When a notification is sent and there are policies configured for the selected BPN with an expiration time in the past, Trace-X will throw an error. In that case, an administrator must either update the policy. Then the policy can be resent. === Testing policies In order to test the functionality of policies, an administrator can create a policy with test constraints for connected BPNs. When sending notifications to that BPN, the process should be blocked.