Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Agreement retirement #1615

Merged
merged 32 commits into from
Oct 17, 2024

Conversation

rafaelmag110
Copy link
Contributor

WHAT

Introduces a feature that enables a participant to retire an active contract agreement.

WHY

There are cases where the cancellation or update of a contract agreement might be valid, i.e. as CatenaX use cases evolve the respective frame contracts also do, and legally speaking the old contracts are no longer valid after the new version is released. There should be a way to technically retire the old agreements, effectively terminating any ongoing transfer process and disabling any new transfer request on that agreement.

FURTHER NOTES

Only in memory storage is provided for the AgreementsRetirementStore. An SQL based implementation will be provided in a following PR.

This feature only works from a provider perspective since no "agreement retirement message" is sent to the consumer. This only enables the technical retirement of an agreement after the official retirement is legally agreed upon by both parties.

Implements DR introduced in #1604
Closes eclipse-tractusx/sig-release#777

Copy link

@bmg13 bmg13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just have some nits so far, all looks great

settings.gradle.kts Outdated Show resolved Hide resolved
@rafaelmag110
Copy link
Contributor Author

@ndr-brt I took your advise and introduced a service in between. I felt it was not needed before, but indeed it makes the API controller code more clearer.
I also took your advise and changed the policy function to a preValidator instead. The validator method is part of the new service. As such we don't need the policy function anymore.

Copy link
Contributor

@wolf4ood wolf4ood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smol nits, but i would use ContractAgreement in the service instead of the PolicyContext

@rafaelmag110
Copy link
Contributor Author

@wolf4ood I changed the isRetired to handle a String agreementId and instead of the PolicyContext. I also introduced a PolicyValidator class. Please have a look.

@rafaelmag110
Copy link
Contributor Author

@ndr-brt I address your suggestions. The AgreementsRetirementService was moved into a separate extension is not provided as default.
I also refactored the asserts on a AbstractResult to use the class from edc junit. Please have a look.

Copy link
Contributor

@ndr-brt ndr-brt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@wolf4ood
Copy link
Contributor

@rafaelmag110 just regenerate the DEPENDENCIES file then we can merge it :)

Copy link

sonarcloud bot commented Oct 17, 2024

@rafaelmag110
Copy link
Contributor Author

@wolf4ood
all ✅
🚀

@wolf4ood wolf4ood merged commit 27e6b15 into eclipse-tractusx:main Oct 17, 2024
32 checks passed
@rafaelmag110 rafaelmag110 deleted the agreements_retirement branch October 17, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

EDC - Terminate or Update contract agreements
4 participants