Domain deep dive — Corporate AGM
Purpose
Section titled “Purpose”Single D1 narrative for engineers working on annual general meeting compliance, ACRA-related batch jobs, and scheduler interactions. It ties together:
- Generated Corporate AGM DocType reference pages
- AGM & scheduler, Schedulers, Known issues & roadmap
- Application linkage — AGM
id→ Application (see Incorporation & application)
Domain boundary
Section titled “Domain boundary”| In scope | Out of scope (link instead) |
|---|---|
| AGM master, Status of AGM search UI, cron/sync logs | Full ACRA product documentation |
scheduler_events/agm_legacy.py, 0 7 * * * job | Generic Frappe scheduler tuning — ERPNext docs |
| PDFs tied to Application / corporate docs | Broad Application PDF pipeline — Application lifecycle |
DocType cluster (generated)
Section titled “DocType cluster (generated)”| Sub-theme | Examples |
|---|---|
| Core | agm, status_of_agm, agm_table |
| Cron / sync logs | agm_cron_log, agm_cron_manual, agm_sync_log, agm_sync_legacy_log, agm_cron_legacy_log |
See the category index: corporate-agm.
Code map
Section titled “Code map”| Layer | Primary locations |
|---|---|
| Cron | scheduler_events/agm_legacy.py — agm_conditional_legacy (daily 0 7 * * * per Schedulers) |
| AGM controller | lee_kim_alliance_erp/doctype/agm/agm.py — ACRA helpers, analyze_table_fields, etc. |
| Hooks (disabled) | hooks.py — commented "AGM": {"on_update": "leekimerp.tasks.after_agm_update_generate_auto_email"} |
| Tasks | tasks.py — after_agm_update_generate_auto_email (do not wire back without staging proof) |
Flow (scheduler)
Section titled “Flow (scheduler)”Overlay priority (for overlays.json)
Section titled “Overlay priority (for overlays.json)”| Priority | DocType keys | Rationale |
|---|---|---|
| P1 — Overlays present | agm, status_of_agm, agm_cron_log | Master record, ops dashboard, cron debugging |
| P2 | agm_sync_log, agm_cron_manual, agm_table | Sync troubleshooting and child data |
| P3 | Legacy log DocTypes | Retention / migration; overlay if still queried |
Failure modes (where to look)
Section titled “Failure modes (where to look)”| Symptom | First checks |
|---|---|
| Cron “stuck” or silent | AGM & scheduler — never re-enable broken on_update without load tests |
| ACRA errors | Token helpers in agm.py / legacy paths; Error Log; API rate limits |
| Wrong company / UEN | AGM id → Application; nominee / UEN fetch fields |
Logs: Scheduled Job Log, agm_cron_log, Frappe Error Log, MariaDB slow queries if batch scans grow.
Related
Section titled “Related”- Engineering deliverables — governance policies (orthogonal to this domain narrative)
- Domain deep dive — Automation & communications — scheduled emails and disabled hooks context
- AGM & scheduler
- Domain documentation strategy
- Documentation upgrade roadmap
- Schedulers