Domain Glossary (Grill 2026-06-15)
Glossary ของ grill รอบ Lego ↔ Orchestration Integration — term ที่ override 09062026 mark [supersedes]; 4 conflict resolved + scope locked
อัปเดต: 2026-06-15
Glossary ของ grill รอบ Lego ↔ Orchestration Integration — anchor ที่
15062026/orchestration-integration/Parent glossary:09062026/CONTEXT.md(Workflow Visibility + Orchestration) — term ที่ grill นี้ override จะ mark[supersedes 09062026 §X]Spec คู่: 00-OVERVIEW.md + ไฟล์ย่อย 01-04 กฎ: glossary เท่านั้น — ไม่มี implementation detailStatus: grill เสร็จ (2026-06-15) — 4 conflict resolved + scope locked; spec 00-04 reconciled ตรงแล้ว
Conflicts ที่กำลัง resolve (กับ parent glossary)
| # | spec ใหม่ (15062026) | parent (09062026) ที่ lock | สถานะ |
|---|---|---|---|
| A | Orchestrator notify ทั้งหมด (D5) | §7 Notification Split: Lego→requestor | ✅ data-ownership split, Orch=ไม่ยิง (ดู Terms) |
| B | Resubmitted เป็น status ใหม่ | §1/§3/§10: Resubmit = Rework→Submitted | ✅ Resubmitted แยกจริง (ดู Terms) |
| C | 2 actor (Maker→InReview, Reviewer→Reviewed) | §7 saga: admin คนเดียว (AssignedAdminUserId) | ✅ 2-actor (ดู Terms) |
| D | resubmit notify Maker คนเดิม | §7: notify AssignedAdmin คนเดียว | ✅ Workflow ยิงเอง (รวมใน Notification term) |
Grill Scope (resolved 2026-06-15)
grill รอบนี้ออกแบบ integration contract (จุดที่ service คุยกัน) เท่านั้น — ไม่ ออกแบบภายในของ Workflow/Task
- Lego + Orchestrator (saga/contract) = ในขอบเขต grill (user เป็นเจ้าของ design)
- Workflow/Task internals = นอกขอบเขต — treat เป็น black box ที่ต้อง emit/รับ message ตาม contract; mapping ภายใน (เช่น pickup mechanism, phase model) = ไปคุยกับทีมเจ้าของ (Phase-0)
- ดังนั้น contract matrix (00 §7) M3-M5, M9-M14 = ข้อเสนอไปคุยกับทีม Workflow/Task ไม่ใช่ค่าที่ lock ฝ่ายเดียว
Open item (ไปคุยกับทีม Workflow) — InReview มีที่มาไหม
code ปัจจุบัน (TakeActionHandler) = role-based, action มีแค่ APPROVE/REJECT, ไม่มี pickup/claim; Rework = REJECT+OnRejectToPhaseOrder>0; SentToReviewer = APPROVE บน non-final phase
- ถ้า Workflow มี claim/pickup →
InReview(maker หยิบ) มีที่มา → 2-actor แยกจริง - ถ้า role-based ไม่มี pickup →
InReviewไม่มี trigger → อาจ map = “phase แรก IN_PROGRESS” (เข้าคิว) หรือตัดทิ้ง - ค้างไว้ตัดสินกับทีม Workflow — กระทบว่า status list มี
InReviewแยกไหม
Terms (resolved)
Maker / Reviewer (2-actor 4-eye) [supersedes 09062026 §7 single AssignedAdminUserId]
review เป็น 2 จังหวะ 2 คน (grill 2026-06-15):
| Term | คือ | จดเมื่อ | map Lego status |
|---|---|---|---|
| Maker | Employee ที่หยิบงานจากกองกลาง (คนเตรียม/ตรวจเบื้องต้น) | pickup | InReview |
| Reviewer | Employee role reviewer ที่ Maker ส่งให้พิจารณา (คนตัดสิน) | sent-to-reviewer | Reviewed |
- orchestration track 2 identity:
MakerUsername(pickup) +ReviewerUsername(sent-to-reviewer) — แทนAssignedAdminUserIdเดี่ยวเดิม - 4-eye audit: รู้ว่าใครหยิบ-ใครตัดสิน
- “Maker” = Employee role ฝั่งธนาคาร (คนละตัวกับ
CompanyRole.Makerของ Customer — สืบทอดจาก 09062026 §7)
Decision Authority (4-eye gate)
ใครตัดสินอะไรได้ (grill 2026-06-15, option B):
| Action | Maker (UnderReview) | Reviewer (UnderConsideration) |
|---|---|---|
| Approve | ❌ ห้าม (กันคนเดียวอนุมัติ) | ✅ |
| Reject | ✅ (kick-back ก่อนส่ง reviewer) | ✅ |
| Rework | ✅ (kick-back) | ✅ |
- enforce ที่ orchestrator saga (
OnDecisionExpectState) ไม่ใช่ Lego — Lego validator เห็นแค่ status (in-flight) ไม่รู้ Maker/Reviewer; 4-eye เป็นความรับผิดชอบของ saga - Approve รับเฉพาะ
UnderConsideration; Reject/Rework รับ{UnderReview, UnderConsideration}
Resubmitted (status ใหม่) [supersedes 09062026 §1/§3/§10 "Resubmit = Rework→Submitted"]
status ของ FlowInstance หลัง owner กด Resubmit จาก Rework — เป็นค่า distinct ไม่ใช่ Submitted (grill 2026-06-15):
- กด resubmit →
FlowInstance.Status = Resubmitted(ผู้ใช้เห็น “แก้ไขแล้ว อยู่ระหว่างตรวจสอบ” แยกจาก submit แรก) - Lego set เอง (local) ตอนกดปุ่ม — symmetric กับ
Submitted(ไม่ใช่ progress projection จาก orchestrator) - ripple ที่ต้องแก้:
HistoryAction.ResubmitmapRework→Resubmitted(เดิมRework→Submitted);IsActiveSlotรวม Resubmitted; in-flight set ของ validator รวม Resubmitted; StepAccess matrix เพิ่มแถว (catch-all = view-only อยู่แล้ว) - saga ฝั่ง orchestrator: OnResubmit re-enter
UnderReview(กลับไปหา Maker คนเดิม)
Notification Ownership (data-ownership split) [supersedes 09062026 §7 "orchestration→maker/admin" + supersedes grill D5 "orchestrator-all"]
แต่ละ service notify เฉพาะ audience ที่ตัวเองถือ data — orchestrator ไม่ยิง notification เลย (grill 2026-06-15):
| Audience | ผู้ยิง | data ที่ถือ | ยิงเมื่อ |
|---|---|---|---|
| Requestor | Lego | requestorUserId + email + deep link resume (?id=) | status เปลี่ยน: Approve/Reject/Rework/Cancel |
| Maker pool | Workflow | maker pool | งานเข้ากองกลาง (create instance) |
| Assignee (Maker) | Workflow | assignee identity | resubmit/resume |
| — | Orchestrator | — | ไม่ยิงเลย |
- เหตุผล: “split by audience” ≠ “logic ซ้ำ 2 service” — แต่ละฝั่ง notify คนที่ตัวเองมี contact data อยู่แล้ว = clean separation
- ผล: orchestrator ตัด
INotifyPort+IMakerDirectoryPortทิ้ง; ตัด Phase-0 dependency “maker role name” (กลายเป็นเรื่องภายใน Workflow) - Lego เพิ่ม
PublishRejected+PublishCancelled(เดิมมีแค่ Approved/Rework)