-
Notifications
You must be signed in to change notification settings - Fork 2
Processor Architecture Overview
The nr-forest-client-processor is an autonomous background processing microservice responsible for orchestrating submission evaluation, duplicate detection, automated approvals, and legacy persistence.
To minimize coupling between components and eliminate the overhead of external message brokers (such as RabbitMQ or Kafka), the processor uses Spring Integration message channels. Submissions transition through ten logical channels (#1 through #10), each handled by specialized event listeners.
flowchart TD
subgraph Ingestion["1. Ingestion Phase"]
CH1["Channel #1: Submission Loader\n(Polls PostgreSQL for Pending Submissions)"]
end
subgraph Evaluation["2. Verification & Matching Phase"]
CH2["Channel #2: Validator & Duplicate Matcher\n(Evaluates Against Legacy Oracle Data)"]
CH3["Channel #3: Manual Review Router\n(Marks for Staff Attention)"]
CH4["Channel #4: Auto-Approval Pipeline\n(Validates Clean Submissions)"]
end
subgraph StaffReview["3. Staff Review Phase"]
CH5["Channel #5: Staff Notification Dispatcher\n(Alerts Ministry Administrators via Email)"]
CH6["Channel #6: Reviewed Submission Loader\n(Picks up Adjudicated Submissions)"]
CH7["Channel #7: Post-Review Evaluator"]
end
subgraph Completion["4. Completion & Legacy Sync"]
CH8["Channel #8: Rejection Notification Dispatcher\n(Sends Explanation Email to Applicant)"]
CH9["Channel #9: Approval Notification Dispatcher\n(Sends Success Email with Client Number)"]
CH10["Channel #10: Legacy Oracle Persister\n(Commits Approved Client Record to THE Schema)"]
end
CH1 --> CH2
CH2 -->|Ambiguous or Conflicts| CH3
CH2 -->|100% Clean Match| CH4
CH3 --> CH5
CH4 --> CH7
CH6 --> CH7
CH7 -->|Rejected| CH8
CH7 -->|Approved| CH10
CH10 --> CH9
-
Trigger: Periodic polling timer (
ca.bc.gov.nrs.processor.poolTime, defaults to5M). -
Action: Queries PostgreSQL for submissions with status code
Submission Pending Processing. Extracts submission metadata and payloads, then dispatches them into Channel #2.
-
Action: Performs deep verification of client information:
- Validates incorporation number and entity status against BC Registry data.
- Queries the legacy Oracle service for potential duplicate client numbers, names, or addresses.
- Generates a confidence match score.
-
Routing:
- If potential duplicate or ambiguity detected: routes to Channel #3.
- If 100% clean with no conflicts: routes to Channel #4.
-
Action: Updates submission status to
Under Reviewin PostgreSQL, attaching the duplicate match details and reasons for manual inspection. - Next Step: Forwards message to Channel #5.
-
Action: Updates submission status to
Approved. - Next Step: Moves submission directly into Channel #7 (Post-Review Pipeline).
- Action: Triggers an administrative alert to ministry staff informing them that a submission requires manual review.
-
Action: Picks up submissions that have been reviewed and adjudicated by ministry staff in the Staff Review portal (
SubmissionReviewPage.vue). - Next Step: Forwards to Channel #7.
-
Action: Evaluates the decision recorded on the submission:
- If decision is
Rejected: routes to Channel #8. - If decision is
Approved: routes to Channel #10.
- If decision is
- Action: Issues an email request via the backend's CHES client informing the applicant of the rejection reason.
- Action: Issues an email request with the newly assigned Forest Client Number to the applicant.
-
Action: Calls the
legacyservice to insert the new client record, assign the client number from the Oracle sequence, and save associated locations and contacts into theTHEschema. Once successfully committed, triggers Channel #9.
This wiki serves as the central documentation and knowledge base for the Forests Client Management System, maintained by the British Columbia Ministry of Forests.
Please Note:
- This wiki is a living document maintained by the development team and contributors.
- When making substantial architectural or code changes, remember to update the corresponding wiki documentation.
- Always verify critical environment configurations against team vaults and OpenShift secret managers.
Have questions, found a documentation discrepancy, or need clarification?
- Questions or Bug Reports: Open an issue in the GitHub repository
- Pull Requests: Submit code or doc improvements via Pull Requests
- Database Schema Reference: Explore our SchemaSpy ER Diagrams
Forest Client Wiki | GitHub Repository
- Architecture Overview
- Frontend Architecture
- Frontend Structure
- Backend Architecture
- Backend Structure
- Legacy Architecture
- Processor Architecture
- Data Model
- Development Overview
- Local Setup & Docker
- Frontend Setup
- Backend Setup
- Project Conventions
- Frontend Structure Guidelines