Appearance
Workflow Governance — Business Rules
Tổng quan
Domain này là lớp “control plane” cho:
- custom permission,
- dashboard report permission,
- approver matrix,
- task status / tag / group / subtask,
- project label,
- knowledge base question,
- complaint permission config.
Điểm quan trọng nhất:
- đây không phải business runtime của từng module,
- mà là lớp governance/config điều khiển module khác hoạt động.
Nhóm nghiệp vụ
| Nhóm | Vai trò |
|---|---|
| Custom permission | Tạo role động, gán modules |
| Report permission | Cấu hình quyền xem báo cáo/thống kê |
| Approver matrix | Gán người duyệt theo request type và scope |
| Task metadata | Workflow status, task tag, tag group, subtask |
| Project label | Label master cho project/task |
| Knowledge base | Kho câu hỏi / tag cho vận hành CRM |
| Complaint config | Cấu hình quyền complaint theo branch/user |
Quy tắc nghiệp vụ
| Mã | Quy tắc |
|---|---|
| BR-WG-001 | settings ở domain này là control plane; runtime consumption nằm ở projects, report, complaint, ecommerce và CRM. |
| BR-WG-002 | request_approver là engine đa domain, không chỉ riêng timekeeping hay refund. |
| BR-WG-003 | Dashboard report permission không tự map động từ schema; FE đang tự hardcode report -> module. |
| BR-WG-004 | knowledge base question nằm trong crm, nhưng route quản trị lại sống trong settings. |
| BR-WG-005 | subtask là config master của ecommerce service/product, còn task status/tag/group và project label thuộc project domain. |
Boundary
| Boundary | Ghi chú |
|---|---|
projects | consumer của workflow status, tag, label |
report | consumer của report/dashboard permission |
complaint | business app thật của complaint nằm ngoài settings |
ecommerce | approver types refund/negative payment/device/doctor commission, và subtask/service_subtask |
crm | knowledge base question/tag |
Rủi ro / Findings
| Mức | Finding |
|---|---|
| P1 | request_approver ownership đang mờ giữa ecommerce và hrm metadata. |
| P1 | ApproverPage sort tab theo route key thay vì business order, làm governance UI thiếu ổn định. |
| P1 | Dashboard report permission đang hardcode map report -> module, nên thêm report mới rất dễ lệch quyền. |
| P1 | TaskTagTable đang lộ semantic drift từ domain khác qua wording “Tiền tour” và field disable/disabled. |
| P2 | Knowledge base route nằm trong settings nhưng moduleId/nav lại tách riêng, nên không thật sự đồng nhất với internal settings tree. |