Immutability in the EDC #3664
-
I'd like to understand how the EDC views the topic of immutable objects in the Management API. PUT and DELETE operations are available on the
As contract agreements cannot be deleted, it is impossible to alter an asset after an associated contract agreement was made. This is reflected by the APIs behavior on DELETE but not on PUT where the return code signals that a change to the resource was applied when it was in fact not. Let us suppose a scenario where a backend service was migrated from one URL to another. This would have to be reflected in the HttpDataAddress's baseUrl. However, this scenario can't be executed with the PUT /v3/assets/{{id}} request currently. So my question is: What is the intended behavior for the EDC wrt mutability of assets? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Immutability of objects is highly influenced by business rules, and possibly even legal requirements. Whether it's acceptable to change an asset, that's referenced in a contract, may vary from jurisdiction to jurisdiction. EDC can't make assumptions about that with any degree of certainty. We do, however, enforce mutability rules where they are technically necessary, for example deleting an asset that is referenced by a contract would leave us with an inconsistent state thus we disallow it. Thus, changing a contracted asset may be "unlawful", or against business rules in a particular use case, but those must be enforced elsewhere. So a |
Beta Was this translation helpful? Give feedback.
Immutability of objects is highly influenced by business rules, and possibly even legal requirements. Whether it's acceptable to change an asset, that's referenced in a contract, may vary from jurisdiction to jurisdiction. EDC can't make assumptions about that with any degree of certainty. We do, however, enforce mutability rules where they are technically necessary, for example deleting an asset that is referenced by a contract would leave us with an inconsistent state thus we disallow it.
Thus, changing a contracted asset may be "unlawful", or against business rules in a particular use case, but those must be enforced elsewhere.
So a
PUT
on an asset should indeed change it, regardless w…