1
0

FG3-4 executable build — economic-settlement process

Upgrades the FG3-4 sub-process from a composition stub to a Level 4 atomic
executable: BPMN process Process_SaimnieciskaNorekina (advance request,
settlement submission/approval, VPC processing, reconciliation and outcome
handling across the Nodarbinatais/Iestade/VPC lanes), DMN decision
Decision_AvansaNorekins (FIRST hit policy, advance-vs-expense reconciliation),
resource roles/agents/mappings and policies metadata. Transcribed from the
Valsts Kase FG3 register sections 3.5.2 and 3.5.4. Validates against the
UAPF 2.2.0 schemas and the uapf-cli validator.
This commit is contained in:
2026-05-19 20:09:38 +00:00
parent 81d32e81d5
commit e0cf11e4ae
9 changed files with 455 additions and 12 deletions

View File

@@ -1,16 +1,73 @@
# FG3-4 — Saimnieciskā norēķina veikšana
Economic settlement: handling of advances, petty-cash and other economic settlements with employees and counterparties.
Level 4 atomic executable process for economic-expense settlement — the
handling of advances and the reconciliation of advances against documented
employee expenses. The second FG3 sub-process taken to executable depth.
- **UAPF level:** L4 (atomic sub-process)
- **UAPF level:** L4 (atomic executable)
- **Package id:** `vk.gramatvediba.fg3-4`
- **Source:** Valsts Kase *Grāmatvedības uzskaites procesu apraksts* — FG3
schema and process register.
- **Included by:** `processes/fg3` (function group FG3).
- **Source:** Valsts Kase *Grāmatvedības uzskaites procesu apraksts* — FG3
process register, section 3.5.2 (*Saimnieciskie norēķini un to kustība*)
and section 3.5.4 (*Avansa atmaksas*).
## Process
`bpmn/saimnieciska-norekina.bpmn` (`Process_SaimnieciskaNorekina`) transcribes
the economic-settlement flow across three lanes mapped from the source RACI
columns:
- **Nodarbinātais** — submits the advance request (3.5.2.1) and the expense
settlement with supporting documents (3.5.2.2).
- **Iestāde** — approves the advance request and the settlement, and informs
the employee of any repayment (3.5.4.2).
- **VPC** — processes the settlement (3.5.2.3), reconciles it, and prepares a
repayment request (3.5.4.1), an additional payment, or posts the document.
Flow: advance request → approval → settlement submission → approval → VPC
processing → reconciliation decision → one of three outcomes. Two terminating
states: *settlement posted* or *advance repayment requested*.
## Decision
`dmn/avansa-norekins.dmn` (`Decision_AvansaNorekins`) is a `FIRST` hit-policy
decision table that sets the outcome variable `norekinResultats` from two
inputs:
| Input | Values |
|-------|--------|
| `avansaSituacija` | `nav-avansa`, `avanss-lielaks`, `avanss-vienads`, `izdevumi-lielaki` |
| `avansaVeids` | `karte`, `konts`, `nav` |
Outcomes: `papildu-izmaksa` (no advance, or expenses exceed the advance —
the difference is paid to the employee), `slegts` (advance equals expenses),
`parnesums` (a card advance exceeds expenses — the balance carries forward to
the next period), `atmaksa` (an account advance exceeds expenses — the
difference is repaid). The `Task_NoteiktRezultatu` business-rule task
evaluates it.
## Resources
`resources/mappings.yaml` binds every BPMN user task and the DMN decision to a
target in `resources/roles.yaml` / `resources/agents.yaml`. Human steps are
`manual`; the AI agent `agent.norekinu-asistents` is bound `assisted` to the
settlement processing and the reconciliation decision — it extracts document
data and proposes the outcome, the accountant decides. No step is `autonomous`.
## Transcription note
The advance request (3.5.2.1) is modelled as the process entry point; in
practice it is optional — an economic settlement may be submitted for expenses
already incurred without a prior advance, a case the decision table covers via
the `nav-avansa` input value. Advance disbursement and the additional payment
themselves are executed in FG2 (payments) and are referenced rather than
duplicated here. Step identifiers use stable BPMN/DMN element ids;
reconciliation against the register `process nr.` numbering is a tracked
follow-up and any schema/register discrepancy is recorded rather than silently
resolved (see `docs/conventions.md`).
## Status
Draft composition placeholder. The sub-process is identified and wired into
FG3 via `includes`; its executable build (BPMN + DMN + resource mappings)
follows in a later step. FG3-1 is the sub-process taken to executable depth in
this proof-of-concept.
Draft. The package is structurally complete and validates against the UAPF
2.2.0 schemas; lifecycle status advances to `review` once the source-numbering
reconciliation is signed off.