Cane Agency · PWF Seriesสถาบันอ้อย · ชุดเอกสาร PWF
Six workflows own the contractor lifecycle from onboarding to books; the work-order state machine (Section 8) is the backbone WF-19…21 run on. Extensions land in existing workflows: WF-05 (settlement gains the settlement_offset ServicePayment), WF-06 (a service credit item may link its delivering work order), WF-13…15 (consent, scoring & origination accept contractor subjects).
workflowหกตัวคุมวงจรชีวิตผู้รับเหมาตั้งแต่ขึ้นทะเบียนถึงบัญชี; state machine ใบสั่งงาน (ข้อ 8) คือกระดูกสันหลังที่ WF-19…21 วิ่งบน ส่วนขยายลงในworkflowเดิม: WF-05 (ปิดงวดเพิ่ม ServicePayment แบบ settlement_offset), WF-06 (รายการสินเชื่อบริการลิงก์ใบสั่งงานได้), WF-13…15 (ความยินยอม การให้คะแนน การออกสินเชื่อ รับผู้ถูกประเมินแบบผู้รับเหมา)
Normative in the graph (workOrderStateMachine). Parallels — never replaces — the delivery, crop and loan machines.
บรรทัดฐานอยู่ใน graph (กราฟ) (workOrderStateMachine) ทำงานคู่ขนาน — ไม่แทนที่ — state machine การส่งมอบ อ้อย และสินเชื่อ
| From → Toจาก → ถึง | Eventเหตุการณ์ | Guardเงื่อนไข |
|---|---|---|
| awarded → scheduled | ScheduleSet | Escrow gate: if payment_method = escrow, escrow_state must be funded; crew/machine capacity available.ประตู escrow: หากชำระแบบ escrow ต้อง funded; ชุดงาน/เครื่องจักรว่าง |
| awarded → cancelled | Cancel | Before dispatch only; funded escrow refunds in full; instant no-show posts a strike + re-broadcast at the same price.ก่อนจัดคิวเท่านั้น; escrow ที่เติมแล้วคืนเต็ม; งานด่วนเบี้ยวถูกบันทึกโทษ + กระจายซ้ำราคาเดิม |
| scheduled → dispatched | WorkDispatched | Assignments issued to operators (crew app).ออกการมอบหมายถึงผู้ปฏิบัติงาน (แอป crew) |
| dispatched → in_progress | WorkStarted | Operator GPS check-in at the field (work_log).เช็กอิน GPS หน้างาน (work_log) |
| in_progress → completed | WorkCompleted | work_log evidence present; quantities recorded.มีหลักฐาน work_log; บันทึกปริมาณครบ |
| completed → verified | WorkVerified | Requester sign-off — weigh-ticket-assisted for harvest/haulage; gates payment, review, agronomy auto-log, books.ผู้ว่าจ้างตรวจรับ — อิงบัตรชั่งสำหรับงานตัด/ขนส่ง; ประตูการจ่าย รีวิว บันทึกเกษตร บัญชี |
| completed · verified → disputed | WorkDisputed | Requester declines with a mandatory reason; escrow frozen (FR-55); pending release halted.ผู้ว่าจ้างปฏิเสธพร้อมเหตุผลบังคับ; escrow แช่แข็ง (FR-55); การปล่อยที่ค้างถูกหยุด |
| disputed → verified · cancelled | DisputeResolved | platform_admin mediation on work_log evidence (Q5); may verify a partial quantity, or cancel with escrow refunded in full; ratings untouched (NFR-10).platform_admin ไกล่เกลี่ยบนหลักฐาน work_log (Q5); ตรวจรับบางส่วนได้ หรือยกเลิกคืน escrow เต็ม; คะแนนไม่ถูกแตะ (NFR-10) |
| verified → closed | ServicePaymentPosted | Payment settled on its rail (escrow release − fee · cash recorded · credit item · settlement offset); terminal.ชำระตามช่องทาง (ปล่อย escrow − ค่าธรรมเนียม · บันทึกเงินสด · รายการสินเชื่อ · หักกลบปิดงวด); สถานะสุดท้าย |
| Rev | Dateวันที่ | Changeการเปลี่ยนแปลง |
|---|---|---|
| 1.0 | 2026-07-08 | Initial document — renders the contractor perspective from spec-graph v5.0 (PROP-004 accepted): WF-18…23, WF-05/06/13…15 extensions, the work-order state machine (Section 8).ฉบับแรก — เรนเดอร์มุมมองผู้รับเหมาจาก spec-graph v5.0 (PROP-004 อนุมัติ): WF-18…23 ส่วนขยาย WF-05/06/13…15 และ state machine ใบสั่งงาน (ข้อ 8) |
| 1.1 | 2026-07-08 | PROP-005 (FED, spec v6.0): perspective re-keyed from customer group to capacity (document code unchanged); identity defers to the federation context (Person · Tenant · TenantCapacity · Membership); every *_tenant_type + *_tenant_id pair collapses to tenant_id.PROP-005 (FED, spec (สเปก) v6.0): มุมมองเปลี่ยนคีย์จากกลุ่มลูกค้าเป็น capacity (รหัสเอกสารคงเดิม); อัตลักษณ์อ้างอิงบริบท federation (Person · Tenant · TenantCapacity · Membership); คู่ *_tenant_type + *_tenant_id ทั้งหมดยุบเป็น tenant_id |
| 1.2 | 2026-07-09 | PROP-010 (GL, spec v9.0): WF-23 widens — the contractor's books become a full financial system (WF-36 onboarding, WF-38 AR/AP, WF-39 bank reconciliation, WF-40 period close & statements); the payer side of ServicePayment auto-posts uniformly (NFR-24); statements to a bank only via ConsentGrant scope books (NFR-26).PROP-010 (GL, spec v9.0): WF-23 ขยาย — books ของผู้รับเหมาเป็นระบบการเงินเต็ม (WF-36 เริ่มใช้, WF-38 AR/AP, WF-39 กระทบยอดธนาคาร, WF-40 ปิดงวดและงบ); ด้านผู้จ่าย ServicePayment ลงอัตโนมัติเป็นหนึ่งเดียว (NFR-24); งบถึงธนาคารผ่าน ConsentGrant scope books (NFR-26) |
| 0.1.0 | 2026-07-11 | PROP-014 (spec v0.1.0): semantic versioning restarted at 0.1.0 (was Rev 1.2 · 2026-07-09); docnav updated for the gov_cluster split — GOV re-homed to docs/gov/ocsb/, new BOARD (กอน.) sibling added.PROP-014 (spec v0.1.0): รีสตาร์ท semantic versioning ที่ 0.1.0 (เดิม Rev 1.2 · 2026-07-09); ปรับ docnav ตามการแยก gov_cluster — ย้าย GOV ไป docs/gov/ocsb/ เพิ่มพี่น้อง BOARD (กอน.) |
| 0.2.0 | 2026-08-03 | PROP-073 (spec v0.47.0): one word — Tenant. Party → Tenant, party_id (and every prefixed form) → tenant_id, PartyCapacity/PartyQualification/PartyFounded → Tenant*, party context/switcher → tenant context/switcher, cross-party → cross-tenant, organisation → organization, and ผู้เล่น retired as the Thai gloss (the Latin word tenant instead, R-THAI). Hold list untouched: counterparty · third party · tripartite working group · Person*/person_id; display codes and token claims were held by R-NULL for one release and then MOVED at v0.47.1 on client decision (C-1), because no token has ever been SIGNED — no auth exists in the built ocsb/ocsf prototypes — and the only printed codes were eight fixture strings in apps/ocsf/fund-shell.jsx, swept in the same pass: PTY- → TNT-, TCA- → TCA-, TQL- → TQL-, claim tnt → tnt, claim dep → dep. Carried in the same pass: the PROP-075 rectification — the retired directory noun domain becomes department (A-82 R-ONETREE) and the dangling A-86/A-87/A-88 citations are re-pointed at the ids they were actually given, A-81/A-82/A-83.PROP-073 (spec v0.47.0): คำเดียว — Tenant Party → Tenant, party_id ทุกรูป → tenant_id, PartyCapacity/PartyQualification/PartyFounded → Tenant*, cross-party → cross-tenant และเลิกใช้ ผู้เล่น เป็นคำแทนวัตถุนี้ในภาษาไทย (ใช้คำละติน tenant ตาม R-THAI) รายการห้ามแตะไม่ถูกแตะ: คู่สัญญา · third party · คณะทำงานไตรภาคี · Person*/person_id รอบเดียวกันแก้ค้างจาก PROP-075: domain → department (A-82) และแก้การอ้าง A-86/A-87/A-88 ที่ไม่มีอยู่จริงเป็น A-81/A-82/A-83 |
| 0.2.1 | 2026-08-03 | PROP-073 PATCH 1 (spec v0.47.1 / v0.47.2 / v0.47.3 as applicable): the identifiers v0.47.0 had held, moved on client decision. PTY-######## → TNT-######## · PCA-######## → TCA-######## · PQL-######## → TQL-######## · token claim pty → tnt · token claim dom → dep (v0.47.1, C-1 — R-NULL had held them as a stored VALUE and a wire format; reversed because no token has ever been signed and the only printed codes were fixture strings). quota_org_officer → quota_officer · lead_org_officer → lead_officer (v0.47.2, C-2 — org is organization abbreviated, not a resemblance). The retired role LABEL swept as a phrase family and quota organization naming the tenant → quota group / กลุ่มโควตา (v0.47.3). All retired forms are in the FR-396 crosswalk and refused in new text by NFR-142.PROP-073 PATCH 1 (spec v0.47.1 / v0.47.2 / v0.47.3 ตามที่เกี่ยวข้อง): ตัวระบุที่ v0.47.0 คงไว้ ถูกย้ายตามการตัดสินของลูกค้า PTY- → TNT- · PCA- → TCA- · PQL- → TQL- · claim pty → tnt · claim dom → dep (v0.47.1, C-1) · quota_org_officer → quota_officer · lead_org_officer → lead_officer (v0.47.2, C-2) · ป้ายชื่อบทบาทที่เลิกใช้และ องค์กรโควตา ที่เรียก tenant → กลุ่มโควตา (v0.47.3) ทุกรูปที่เลิกใช้อยู่ในตารางแปลง FR-396 |