Advance Recovery Boundary
Summary
Payroll calculates a planned recovery from its local advance balance and applies the financial side effect only when the run is frozen.
Audience
Backend and frontend developers, QA and DevOps engineers, support and security engineers, and solution architects.
Overview
Payroll calculates a planned recovery from its local advance balance and applies the financial side effect only when the run is frozen.
Technical Detail
Source and balance ownership
Payroll stores advance summaries and transactions and exposes compatibility operations, while broader advance origination ownership remains Transitional. Calculation caps planned recovery to the remaining local balance.
Freeze application
Freeze verifies recovery was not already applied, verifies each required balance and limit, reduces remaining balances, and creates run-linked recovery transactions. These changes are committed with the run lifecycle update.
Unfreeze reversal
Unfreeze finds unreversed recovery transactions, restores available balances when the summary exists, and creates linked reversal transactions. Repeated reversal is avoided through the link.
Failure boundaries
A missing or insufficient balance blocks freeze. Cross-service balance coordination, concurrent update protection beyond the database transaction, and reconciliation with an external advance owner Require confirmation.
Source References
microservices/src/payroll-service/Domain/PayrollEntities.csmicroservices/src/payroll-service/Application/PayrollCalculationService.csmicroservices/src/payroll-service/Application/PayrollCompatService.cs
Related Articles
See Also
Keywords
- Payroll Service
- Advance Recovery Boundary
- Technical architecture
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly