From 54cdfc8ad4a83cad035302fca8662fd307a99255 Mon Sep 17 00:00:00 2001 From: mk Date: Mon, 22 Jan 2024 10:26:35 +0100 Subject: [PATCH] fix(concept):[#322] remove <> from status add sequence diagram for case 3 --- ...oning-of-contractAgreementId-for-assets.md | 75 +++++++++++++------ 1 file changed, 51 insertions(+), 24 deletions(-) diff --git a/docs/concept/#322-Provisioning-of-contractAgreementId-for-assets/#322-Provisioning-of-contractAgreementId-for-assets.md b/docs/concept/#322-Provisioning-of-contractAgreementId-for-assets/#322-Provisioning-of-contractAgreementId-for-assets.md index 275cd993bc..eac6040e5b 100644 --- a/docs/concept/#322-Provisioning-of-contractAgreementId-for-assets/#322-Provisioning-of-contractAgreementId-for-assets.md +++ b/docs/concept/#322-Provisioning-of-contractAgreementId-for-assets/#322-Provisioning-of-contractAgreementId-for-assets.md @@ -1,10 +1,10 @@ # Concept #322 Provisioning of contract agreement id for assets -| Key | Value | -|---------------|------------------| -| Creation date | 11.01.2024 | -| Issue Id | https://github.com/eclipse-tractusx/item-relationship-service/issues/322 https://github.com/eclipse-tractusx/item-relationship-service/issues/370 | -| State | | +| Key | Value | +|---------------|----------------| +| Creation date | 11.01.2024 | +| Issue Id | https://github.com/eclipse-tractusx/item-relationship-service/issues/322 https://github.com/eclipse-tractusx/item-relationship-service/issues/370 | +| State | DRAFT | # Table of Contents @@ -148,25 +148,6 @@ sequenceDiagram ```` -## 2. Case 2: IRS proceed EDC contract negotiation fails because of internal EDC error - -### Case 2.1: GET contract negotiation return 404 and "type": "ObjectNotFound", - -```` -404 - [ - { - "message": "Object of type ContractNegotiation with ID=f9600523-f8e4-42b3-b388-485370b4f8f4 was not found", - "type": "ObjectNotFound", - "path": null, - "invalidValue": null - } -] -```` - -## 3. Case 3: IRS proceed successful EDC contract negotiation and revokes asset transfers cause by not matching usage policy - -Usage policy is checked before contract negotiation. in case policy mismatch, no negotiation will be started. ````mermaid @@ -196,6 +177,52 @@ sequenceDiagram ```` +## 2. Case 2: IRS proceed EDC contract negotiation fails because of internal EDC error + +### Case 2.1: GET contract negotiation return 404 and "type": "ObjectNotFound", + +```` +404 + [ + { + "message": "Object of type ContractNegotiation with ID=f9600523-f8e4-42b3-b388-485370b4f8f4 was not found", + "type": "ObjectNotFound", + "path": null, + "invalidValue": null + } +] +```` + +## 3. Case 3: IRS revokes asset transfers cause by not matching usage policy + + +Usage policy is checked before contract negotiation. in case policy mismatch, no negotiation will be started. + + +````mermaid + +sequenceDiagram + %%{init: {'theme': 'dark', 'themeVariables': { 'fontSize': '15px'}}}%% + autonumber + ContractNegotiationService --> ContractNegotiationService : startNewNegotiation + ContractNegotiationService --> PolicyCheckerService : isValid +alt is valid + ContractNegotiationService -->> EdcSubmodelClientImpl : return NegotiationResponse + EdcSubmodelClientImpl ->> EdcSubmodelClientImpl : getContractAgreementId from NegotiationResponse + EdcSubmodelClientImpl ->> AsyncPollingService : retrieveEndpointReference + AsyncPollingService ->> EdcSubmodelClientImpl : EndpointDataReference +note left of EdcSubmodelClientImpl : received EDR Token to receive assets + EdcSubmodelClientImpl -->> EdcSubmodelFacade : EndpointDataReference + EdcSubmodelFacade -->> SubmodelDelegate : EndpointDataReference +else is not valid + ContractNegotiationService ->> ContractNegotiationService : throw UsagePolicyException + note right of ContractNegotiationService : UsagePolicyException MUST cover the policy of catalog item this is relevant to create tombstone afterwards with policy + SubmodelDelegate --> ItemContainer: create tombstone with policy payload +end + + +```` + ## EDC Management API The EDC Management API is provided by EDC consumer. In this case the IRS configured EDC provider logs the required contract aggreements and provides the API to request contract agreements and contract negotations for given contract agreement @id