Expand description
PID-to-workflow routing table.
Every inbound EDIFACT message carries a Prüfidentifikator (PID) that
identifies the MaKo process family and operation. The PidRouter maps
numeric PID values to workflow names, enabling dispatchers to instantiate
the correct Workflow implementation without ad-hoc match chains.
§Mutability contract — build-time only
PidRouter uses &mut self for all registrations. In normal engine usage
the router is populated once during EngineBuilder::build() and is
subsequently sealed inside EngineContext behind a shared &PidRouter
reference. There is no runtime mutation path — all PIDs must be registered
before the engine starts serving messages.
This is intentional: mutation after startup would race with concurrent
dispatch calls and require a RwLock. The read-only runtime path is
therefore always lock-free.
§BDEW PID ranges (incomplete — register all PIDs for your process families)
| Range | Process family |
|---|---|
| 11001–11099 | WiM Gerätewechsel (UTILMD) |
| 13003 | MABIS Bilanzkreisabrechnung (MSCONS) |
| 13002–13028 | Messwerte Gas/Strom/Redispatch (MSCONS) — fragmented across GaBi Gas, Redispatch, GPKE support |
| 17001–17011 | WiM MSB commissioning (ORDERS) |
| 17101–17135 | WiM Stammdaten / Konfiguration (ORDERS) |
| 31001–31002, 31004–31008 | GPKE Netznutzungsabrechnung / MMM-Rechnung (INVOIC) |
| 31003, 31009 | WiM-Rechnung / MSB-Rechnung (INVOIC) — WiM domain |
| 31010 | Kapazitätsrechnung (INVOIC) — Kapazitätsabrechnung Ausspeisepunkte Gas |
| 31011 | Rechnung sonstige Leistung (INVOIC) — AWH Sperrprozesse Gas |
| 33001–33004 | REMADV Bestätigung/Abweisung — paired with INVOIC workflows |
| 37000–37006 | PARTIN Kommunikationsdaten Strom (GPKE Teil 4) |
| 37008–37014 | PARTIN Kommunikationsdaten Gas (GeLi Gas 2.0) |
| 39000–39001 | ORDCHG Stornierung Sperr-/Entsperrauftrag (AWH Sperrprozesse Gas) |
| 39002 | ORDCHG Stornierung Bestellung (WiM Strom Teil 2) |
| 44001–44018 | GeLi Gas Lieferantenwechsel (UTILMD G) |
| 55001–55018 | GPKE Lieferantenwechsel / Kündigung (UTILMD Strom) |
| 55555 | GPKE Teil 4 — Anfrage Daten der individuellen Bestellung (UTILMD Strom) |
§Usage
use mako_engine::pid_router::PidRouter;
let mut router = PidRouter::new();
router.register(55001, "GpkeSupplierChange");
router.register(55002, "GpkeSupplierChange"); // Same workflow, different step
assert_eq!(router.route(55001), Some("GpkeSupplierChange"));
assert_eq!(router.route(99999), None);
assert_eq!(router.len(), 2);Structs§
- PidRouter
- A static mapping from
Prüfidentifikator(PID) values to workflow names.