forked from folio-org/mod-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Synchronize with upstream changes. #150
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This tells Spring Data Rest to utilize this field when implementing optimistic locking on entities.
The minimum length is 1, so a version must be supplied. Provide `1.0` as the default.
Utilize `RepositoryEventHandler` annotation to pre-process the Workflow before creating. Detect if the workflow already exists and if it does then throw an error. Implement the error handling functionality. Make sure this functionality is consistently being handled for all defined exceptions. Perform this check relative to the version tag string to allow for different versions of the same UUID.
…eateAlreadyExistsException.
Make the logger static. Remove `public` modifiers from unit tests. Remove unnecessary `throws` on unit test.
The `openapi.xml` file is rebuilt using `mvn clean verify -P openapi`.
MODWRKFLOW-57: Prevent double-posting of Workflow.
This is a step-by-step style improvement where additional, better, improvements are expected to be made pending further investigation an analysis. The controller advice itself is throwing exceptions, preventing the actual exceptions from being returned to the receiver. Highlights: - Implement an abstract class that performs the exception logic. - Provide `ResponseEntity<String>` as the standard return type. - Relocate and rename the global exception handler as global advice. - Explicitly conver the `ResponseErrors` to a JSON string using `ObjectMapper`. - Remove deprecated use of explicit `Workflow.class` on `@RepositoryEventHandler`. - Rename `handleWorkflowCreate()` to `handleWorkflowBeforeCreate()`.
Pass the exception to the logger error will then allow it to print the stacktrace. This is only done when debugging is enabled, so when debug is disabled pass NULL.
Improve exception handler to better return exceptions to caller in JSON.
rmathew1011
approved these changes
Dec 4, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This brings in the following change sets: