Pipeline state machine, conditions, templates, NATS events

Featurekamo-shared-library
Ya
15 Mei 2026, 18:43 UTC
Mwandishi
Kamo
Ahadi ya
6dfbf70

Sub-project 4 (LOS pipeline & workflow) backend: - New enum LoanConditionStatus (OPEN/CLEARED/WAIVED) - New entities: LoanPipelineMilestone (append-only transition audit), LoanCondition (per-loan checklist row with own state), and LoanConditionTemplate (per-org reusable checklist source) - New repos for each, plus a one-shot blocking-condition query - LoanPipelineStateMachine declares the URLA pipeline (DRAFT through FUNDED) and the universal SUSPENDED/WITHDRAWN/DENIED off-ramps, with required RoleRightType for each arrow - LoanPipelineService orchestrates a transition atomically: validate legality + right + blocking conditions (override gated by LOS_UNDERWRITE_LOAN), stamp the appropriate LoanFile date column, write a milestone, write an ApplicationSubmission for legally-significant transitions (initial disclosure, resubmit processing/underwriting) with SHA-256 snapshot, publish a NATS event - LoanConditionService and LoanConditionTemplateService cover the rest of the CRUD surface - LosPipelinePublisher publishes to JetStream subjects los.pipeline.transition.<orgId> and los.pipeline.condition.<orgId> - NatsConfig provisions a dedicated LOS_PIPELINE stream alongside the existing chat stream so retention can be tuned independently - Six new RoleRightType entries under ServiceType.LOS (renamed to "Commerce: Loan Origination System"): LOS_VIEW_PIPELINE, LOS_TAKE_APPLICATION, LOS_PROCESS_LOAN, LOS_UNDERWRITE_LOAN, LOS_CLOSE_AND_FUND, LOS_SUSPEND_OR_WITHDRAW

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei