Volume 14 · Business Logic & Workflows
เล่มนี้สังเคราะห์ business process หลักของ VTRC ข้าม repository — ไม่ re-derive field-level logic ใหม่ (อยู่ใน core-pipeline chapter ของแต่ละ repo ใน Vol 3-9 แล้ว) แต่ตอบคำถามระดับ platform: กระบวนการ HR หลักแต่ละอย่างไหลผ่าน repo ไหนบ้าง ตรงไหนที่ flow ข้าม repo แล้วไม่มี sync mechanism ที่เชื่อถือได้
เล่มนี้คืออะไร
| บท | หัวข้อ | คำถามที่ตอบ |
|---|---|---|
| 14.1 | HR workflows overview | leave/welfare/recruitment/evaluation/meeting แต่ละ process ใครทำอะไรที่ repo ไหน |
| 14.2 | Cross-service business flows | flow ที่ข้าม repo จริง พร้อม trace แบบ end-to-end |
| 14.3 | Scorecard | business-logic correctness debt — sync gap, race condition, business rule ที่ไม่สอดคล้องกันข้าม repo |
ตัวเลขที่ควรจำ
| ตัวเลข | ค่า | ที่มา |
|---|---|---|
| HR business process หลักที่สำรวจ | 5 | leave, welfare withdrawal, recruitment, performance evaluation, meeting/attendance |
| Repo ที่มีส่วนร่วมในมากกว่า 1 process | vtrc-api, cu-central-api, vtrc-common | ดู 14.1 |
| Cross-service flow ที่ trace ได้เต็ม (caller→callee→side-effect) | 6 | ดู 14.2 |
| Shared-database coupling ที่ยืนยันแล้วไม่มี sync job อัตโนมัติ | อย่างน้อย 3 คู่ | benefit-api↔vtrc-api (schema vtrc), workflow-api↔benefit-api/vtrc-api/HRMI, recruitment-api↔ai-recruitment-api (database recruitment_ai) |
หลักการอ่านเล่มนี้
ทุก process ในบทที่ 14.1 มาจากการอ่าน core-pipeline chapter ของแต่ละ repo ใน Vol 3-9 โดยตรง — citation ชี้กลับไปที่ต้นทางเสมอ ถ้าต้องการ field-level detail (entity, validation rule, state machine เต็ม) ให้ตามลิงก์ไปอ่านที่ repo นั้น
process ที่ยังไม่มีหลักฐานยืนยันครบ (เช่น ขั้นตอนใดขั้นตอนหนึ่งที่ repo เกี่ยวข้องไม่ได้ถูกสำรวจในรอบ Vol 3-9) จะระบุ UNVERIFIED ตรงจุดนั้นชัดเจน ไม่เดาเติมให้ครบ
สิ่งที่เล่มนี้ไม่ cover
- Field-level validation rule ของแต่ละ entity — อยู่ใน
03-persistence/05-cron-jobsของแต่ละ repo - API contract (request/response shape) ของแต่ละ endpoint — อยู่ใน Volume 13
- Deployment/environment ของ service ที่เกี่ยวข้อง — อยู่ใน Volume 15
- Runbook สำหรับ incident ที่เกิดจาก business-logic bug — อยู่ใน Volume 16
อ้างอิงข้าม
- Canonical Truths
- Volume 3 · Legacy Core —
vtrc-apicluster C (leave), cluster D (welfare withdraw) - Volume 6 · Domain Microservices —
benefit-api,recruitment-api,ai-recruitment-api,pms-api - Volume 7 · Meeting Platform
- Volume 13 · API Reference — inter-service call map ที่ flow เหล่านี้พึ่งพา