Replies: 2 comments 4 replies
-
Having the Just one comment: the method to change the state should be a |
Beta Was this translation helpful? Give feedback.
-
I have a question, why do we need the contract definition once the agreement is settled? |
Beta Was this translation helpful? Give feedback.
-
Hi Folks I wanted to share ideas and get feedback on how to achieve contract definition unlisting within the EDC
As Dataspace participant acting as data provider, I may want to unlist/remove Contract Definition being offered without affecting the previously made contract agreements.
Currently a contract definition can be deleted via
DataManagement
APIs with:DEL|{context_path}/contractdefinitions/{id}
and it's permanently deleted from the underlying
ContractDefinitionStore
implementation without checking if contract agreements based on the deleting contract definition are in place. see here.The implications of this current behavior is:
contract negotiation requests based on the deleted definition will fail, which is expected.
transfer requests of assets in a contract agreement based on the deleted definition will fail, which is not expected.
Taken for granted (not yet implemented) that I cannot delete a contract definition if there are contract agreements based on that, how can we support definitions unlisting ?
I've identified a couple of options:
Option 1
An idea could be to introduce a
state
in the contract definition model, which tracks if the it's currently being offered or not. This will allow data providers to still serve the previously made contract agreements to consumers and prevent future contract negotiation based on the unlisted contract definition. The states are not defined yet but they could be something like:Then we could provide a change of state via DataManagement APIs:
PUT|{context_path}/contractdefinitions/{id}/{action}
At this point we could use that state for driving filters where needed. For example if you start a contract negotiation based on
that contract definition that it's not
listed
, the negotiation will fail, while the transfer process will succeed.I would still leave the option to delete contract definition not yet used in agreements (e.g. bad configuration).
Option 2
Another option to achieved this could be writing a custom functions on policy engine that operates in the
contract.cataloging
scope, that checks if the contract definition can still be offered by asking to an external system. This maybe be more flexible since it's custom made but it could require some extra work and it could affect the performance when evaluating the access policy on theContractDefinition
.Let me know if you have other opinions or feedback on this.
Cheers
Enrico
Beta Was this translation helpful? Give feedback.
All reactions