-
Notifications
You must be signed in to change notification settings - Fork 1
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
Resolve #304: Introduce state machine approach #187
Conversation
saalistaja
commented
Apr 25, 2022
•
edited
Loading
edited
- Refactored previous approach to spring state machine
- Mapped current phase, status to new onboarding state enums
- Transitions triggered by simple events from controllers and one technical event for auto-transition on status check
Add tests for OTP verification transitions
Adapt document verification tests to the latest changes
- Mark as choice state PRESENCE_CHECK_FAILED and PRESENCE_CHECK_REJECTED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, these changes are exactly what we needed to improve the state handling in the application. I found several minor issues which are related to consistency, several minor performance improvements and ideas. Feel free to ignore if you disagree with proposed changes.
...arding/src/main/java/com/wultra/app/onboardingserver/statemachine/util/StateContextUtil.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/wultra/app/onboardingserver/statemachine/service/StateMachineService.java
Outdated
Show resolved
Hide resolved
.../com/wultra/app/onboardingserver/statemachine/interceptor/CustomStateMachineInterceptor.java
Outdated
Show resolved
Hide resolved
...com/wultra/app/onboardingserver/statemachine/action/verification/VerificationInitAction.java
Outdated
Show resolved
Hide resolved
...nboarding/src/main/java/com/wultra/app/onboardingserver/statemachine/StateMachineConfig.java
Outdated
Show resolved
Hide resolved
jsonSerializationService.deserialize(identityVerification.getSessionInfo(), SessionInfo.class); | ||
if (sessionInfo == null) { | ||
logger.error("Checking presence verification failed due to invalid session info, {}", ownerId); | ||
identityVerification.setErrorDetail("Unable to deserialize session info"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note to myself, we'll need to also add the error origin due to parallel pull request: #315
...main/java/com/wultra/app/onboardingserver/controller/api/IdentityVerificationController.java
Outdated
Show resolved
Hide resolved
...main/java/com/wultra/app/onboardingserver/controller/api/IdentityVerificationController.java
Outdated
Show resolved
Hide resolved
...oarding/src/main/java/com/wultra/app/onboardingserver/impl/service/PresenceCheckService.java
Outdated
Show resolved
Hide resolved
@romanstrobl Thanks for the feedback. I have fixed all the found issues. |