jaidesx opened a new pull request, #6462:
URL: https://github.com/apache/fineract/pull/6462
## Summary
This PR introduces the foundational member-application workflow for Nsimbi
CBS while preserving Apache Fineract’s `m_client` table as the canonical member
record.
The implementation adds a one-to-one application extension for managing
member onboarding, review and approval before later integration with client
activation, KYC and account-opening processes.
## Changes
* Added the `MemberApplication` domain entity.
* Added `DIRECT` and `AGENCY` application channels.
* Added the following workflow states:
* `DRAFT`
* `SUBMITTED`
* `UNDER_REVIEW`
* `RETURNED_FOR_CORRECTION`
* `APPROVED`
* `REJECTED`
* `WITHDRAWN`
* Added a Spring Data repository with lookup by Fineract client ID.
* Added member-application-specific domain exceptions.
* Added optimistic locking to prevent conflicting updates.
* Added Liquibase migration `0243`.
* Registered migration `0243` in the final tenant changelog.
* Added six member-application permissions.
## Business Rules
The implementation enforces:
* One member application per `m_client` record.
* Maker and checker separation.
* Decisions by the checker assigned when review begins.
* Protection against silent checker substitution.
* Required transition timestamps.
* Chronological workflow timestamps.
* Terminal-state restrictions.
* Clearing previous review information during resubmission.
* Mandatory reasons for rejection and return for correction.
* Agency-reference and decision-reason length limits.
* Trimming of stored agency references and decision reasons.
* No partial entity mutation when validation fails.
## Database Changes
The migration creates `nsimbi_member_application` with:
* A unique foreign key to `m_client`.
* Maker and checker foreign keys to `m_appuser`.
* Workflow and application-channel fields.
* Submission, review and decision timestamps.
* Agency-reference and decision-reason fields.
* Optimistic-lock versioning.
* Workflow-status and agency-reference indexes.
Agency-reference uniqueness is intentionally deferred until the originating
agency identity and composite idempotency rules are defined.
## Permissions
* `CREATE_MEMBER_APPLICATION`
* `SUBMIT_MEMBER_APPLICATION`
* `REVIEW_MEMBER_APPLICATION`
* `APPROVE_MEMBER_APPLICATION`
* `REJECT_MEMBER_APPLICATION`
* `WITHDRAW_MEMBER_APPLICATION`
## Verification
* 71 focused tests passed.
* Zero test failures.
* Zero skipped tests.
* `git diff --check` passed.
* Untracked-file whitespace checks passed.
* `spotlessMiscCheck` passed as the available XML and miscellaneous
formatting check.
* Changed member Java files are formatting-clean.
The exact original test command encountered a Swagger scanner heap failure
during the resolve task. The focused tests passed using the same JVM memory
limit while excluding `:fineract-provider:resolve`.
Module-wide `spotlessJavaCheck` remains affected by seven inherited
formatting violations in user-role and security files that were not modified by
this PR.
## Deferred Work
This foundation PR does not implement:
* REST APIs and command services.
* Fineract client activation integration.
* Permanent member-number generation.
* Detailed KYC states, overrides and expiry rules.
* External NIN-verification fallback.
* Duplicate-member merging.
* Account-opening eligibility.
* Agency onboarding workflow.
* KYC and supporting document management.
* Persistent workflow-transition history.
* Frontend functionality.
* Joint membership or group customization.
Migration `0243` has not yet been executed against a live supported database
and must be verified before this work is merged into the final development
branch.
## Branch Information
* Base: `feat/user-role-administration`
* Compare: `feat/member-module-foundation`
* Commit: `f58d716bf1`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]