Expand description
The INVOIC settle/dispute state machine, shared by every billing family.
Every billing process in German market communication is the same conversation. An invoice is issued; the recipient validates it against the AHB and either settles or disputes it; where this deployment is the issuer, a REMADV comes back confirming or refusing payment, and a COMDIS may refuse that REMADV in turn.
Nothing in it is commodity-specific: the process is keyed on the invoice
reference, and the Sparte only decides which price sheet invoic-checker
fetches — invoicd’s decision, not the workflow’s. GPKE, WiM, GaBi Gas and
GeLi Gas therefore register an InvoicFamily here rather than
implementing the process.
§What a family chooses
InvoicFamily is the whole of the variation — the PID sets, the two role
capabilities, the deadline label and the workflow name. Everything else is
shared.
── Recipient (payer) ────────────────────────────────────────────────
New ──ReceiveInvoic──► InvoicReceived ──[valid]──► ValidationPassed
╰─[invalid]──► Rejected
ValidationPassed ──SettleInvoice──► Settled
╰─DisputeInvoice──► Disputed
── Issuer ───────────────────────────────────────────────────────────
New ──SendInvoic──► InvoicSent ──ReceiveRemadv 33001──► PaymentConfirmed
╰─ReceiveRemadv 33002/3/4──► PaymentDisputed
── Payer, after its REMADV was refused ──────────────────────────────
any settled/sent state ──ReceiveComdis 29001──► ComdisRejected
Any non-terminal state ──TimeoutExpired──► Rejected§Regulatory basis
- INVOIC AHB 1.0 (FV2025-10-01 onwards; AHB 2.8e before) — the invoice message and its Prüfidentifikatoren.
- REMADV AHB 1.0a § 3 — the payment advice. Settlement is „ganz oder gar nicht“: there are no Teilzahlungen, so 33002/33003/33004 are all Abweisungen and only 33001 confirms.
- COMDIS AHB 1.0 — the invoicer’s refusal of a payer’s REMADV (29001).
- APERAK AHB 1.0 § 2.4.1 — the technical acknowledgement, 45 Minuten on a weekday. A different clock from the business answer this workflow runs.
Structs§
- Invoic
Data - The invoice facts a billing stream carries from receipt to settlement.
- Invoic
Projection - In-process read model tracking billing process streams.
- Invoic
Record - Read-model record for a single billing process stream.
- Invoic
Workflow - The INVOIC settle/dispute workflow for one
InvoicFamily. - Remadv
Antwort - The market answer a Nicht-Zahlungsavis carries.
- Remadv
Befund - One
AJTof a Nicht-Zahlungsavis — a published Antwortcode, the Ebene it came from and, on the Positionsebene, the Positionsnummer it belongs to.
Enums§
- Invoic
Command - Commands accepted by the billing workflow.
- Invoic
Event - Events emitted by the billing workflow.
- Invoic
State - Current state of one billing process stream.
Constants§
- ABWEISUNG_
PID - The REMADV a payer sends to refuse an invoice whose tree answers with one code — the plain „Abweisung“ of REMADV AHB 1.0a § 3.1.1.
- COMDIS_
ABLEHNUNG_ PID - COMDIS Prüfidentifikator for an inbound Ablehnung of a REMADV (payer side).
- REMADV_
CONFIRMATION_ PID - The single REMADV PID that confirms payment. Everything else disputes it.
- REMADV_
PIDS - The REMADV Prüfidentifikatoren a payer can answer an invoice with.
- ZAHLUNGSAVIS_
PID - The REMADV a payer sends to confirm — the Zahlungsavis. It carries no
AJTat all (REMADV AHB 1.0a § 3.1.1): agreement needs no Antwortcode.
Traits§
- Invoic
Family - What one billing family chooses. Everything else about the process is shared.
Functions§
- remadv_
confirms truewhenpidis a REMADV that confirms payment rather than disputing it.