Closed mkanal closed 8 months ago
Since we handle the UsagePolicyException
at SubmodelDelegate
and RelationshipDelegate
level, we already have the BPNL of the company, where we want to request data from, available.
By using this BPNL, we do not have the need to extract it from the Catalog and can add it to the tombstone directly.
An additional point to consider is adding the BPNL to the tombstone message instead of adding another field. If we keep adding field which are only filled in specific cases, the tombstone object will become messy soon. Son instead of
"tombstones": [
{
"catenaXId": "urn:uuid:6ce41c0b-c84a-46b0-b4c4-78fce958663d",
"endpointURL": null,
"businessPartnerNumber": "<businessPartnerNumber>",
"policy": {},
"processingError": {
"processStep": "UsagePolicyValidation",
"errorDetail": "Consumption of asset (itemId) is not permitted as the required catalog offer policies do not comply with defined IRS policies.",
"lastAttempt": "2024-01-17T09:02:36.648055745Z",
"retryCounter": 3
}
}
],
it would be
{
"catenaXId": "urn:uuid:6ce41c0b-c84a-46b0-b4c4-78fce958663d",
"endpointURL": null,
"policy": {},
"processingError": {
"processStep": "UsagePolicyValidation",
"errorDetail": "Consumption of asset (itemId) is not permitted for company <businessPartnerNumber>, as the required catalog offer policies do not comply with defined IRS policies.",
"lastAttempt": "2024-01-17T09:02:36.648055745Z",
"retryCounter": 3
}
}
Hi @ds-ext-kmassalski, as discussed in the daily please provide a testdatafile with an asset which can be used for automated tests. Thank you!
Testdata was provided and tavern test created in branch #404-create-tavern-tests. Once the feature is successfully deployt on DEV the test can be run.
PR's with impl: https://github.com/catenax-ng/tx-item-relationship-service/pull/790
Test data: https://github.com/catenax-ng/tx-item-relationship-service/pull/796
done - In case UsagePolicyException is thrown, BPN is written to UsagePolicyException tombstone if available done - businessPartnerNumber is provided inside an UsagePolicyException tombstone if CatalogOffer provides edc:participantId done - businessPartnerNumber is null if edc:participantId is not provided CatalogOffer
As business app I want BPNL for a UsagePolicyException tombstone so that am able to assign a tombstone with UsagePolicyException and policy to a BPNL
Hints / Details
Outcome / Acceptance Criteria
Outcome
Acceptance Criteria
Out of Scope