BLEAF Memo Module Header

🇹🇭 ภาษาไทย

การตั้งค่า Memo Header — หัวใจของ BLEAF ที่กำหนดพฤติกรรมของ e-Form workflow แต่ละประเภท

โครงสร้าง Header

Memo Header
├── Detail      ← ฟิลด์ในแท็บแรก (Memo Type, Team, Title ฯลฯ)
├── Criteria    ← ฟิลด์กรองใน Memo Search Page
├── Config      ← ค่า config ควบคุมพฤติกรรม ← สำคัญมาก
├── Grid Column ← คอลัมน์ใน Memo Search Page
├── Script      ← JavaScript events
└── Button      ← ปุ่ม custom บน header

เส้นทาง: Memo → Header → เลือก Header → ไอคอนดินสอ

Detail (Mandatory Fields)

FieldCodeความหมาย
Memo TypeMEMO_TYPEประเภทของ Memo
Requested Timerequested_timeวันที่ขออนุมัติ
FormFORMATรูปแบบฟอร์ม
Approval MatrixAPPROVAL_MATRIXสายอนุมัติ
WorkflowWORKFLOWประเภท Workflow
Memo NameMEMO_NAMEชื่อเอกสาร

ห้ามตั้งชื่อฟิลด์ขึ้นต้นด้วย S_ หรือ H_

Config Keys หลัก

การแสดงปุ่ม (ACTION_*)

CodeValue(1)ความหมาย
ACTION_CREATE1/0แสดง/ซ่อน ปุ่ม Create
ACTION_COPY1/0แสดง/ซ่อน ไอคอน Copy
ACTION_PREVIEW1/0แสดง/ซ่อน ปุ่ม Preview; Value(2) = ข้อความบนปุ่ม
ACTION_SAVE1/0แสดง/ซ่อน ปุ่ม Save; Value(2) = ข้อความบนปุ่ม
ACTION_SEND1/0แสดง/ซ่อน ปุ่ม Send; Value(2) = ข้อความบนปุ่ม
SEARCH_DELETE_BUTTON1/0แสดง/ซ่อน ปุ่ม Delete ใน Search

Memo ID Format

Codeความหมาย
ID_FORMATRunning Number Format เช่น ${field2}-${created_time?["yyyy"]}-${running_no?["0000"]}ASMS-2019-0001
ID_SEQValue(1) = Sequence Name, Value(2) = d/y/m (reset ทุกวัน/ปี/เดือน)

Email Notifications (MAIL_*)

Codeความหมาย
MAIL_NOTIFY1/0 เปิด/ปิดการแจ้งเตือนอีเมล
MAIL_FROMชื่อ Sender
MAIL_SUBJECTSubject (ใช้ ${memoId} แทนเลข Memo ได้)
MAIL_TEMPLATENode REF ของ Email Template
MAIL_COMPLETE1/0 แจ้งเตือนผู้ร้องขอเมื่องาน Workflow จบ

Folder Path & Storage

Codeความหมาย
PATH_FORMATรูปแบบ folder path เช่น ${field7}/${created_time?["yyyy"]}/${memoId}
SITE_IDชื่อ Site ใน Alfresco ที่เก็บเอกสาร
MONITOR_USERlogin user ที่เห็นเอกสารทุกใบ (ต้องอยู่กลุ่ม site_memo_SiteCollaborator)

ลายเซ็น (DOC_SIGN_*)

Codeความหมาย
DOC_SIGN1/0 แนบ/ไม่แนบลายเซ็น
DOC_SIGN_METHOD1 = แนบทุกลำดับ, 2 = แนบเมื่อผู้อนุมัติสุดท้าย approve
SIGN_PIXELขนาดภาพลายเซ็น (pixel)

Workflow Behavior (WF_*)

Codeความหมาย
CALC_PERCENT_DIVIDE_BY_ZERO1 = ตรวจสอบว่าทุก Task มีผู้อนุมัติ
WF_END_REPLACE_FIELD1/0 replace field ในใบปะหน้าเมื่อ workflow จบ
IMMUTABLE_HEADER_FIELDฟิลด์ที่ไม่ให้แก้ไขหลัง submit

ใบปะหน้า (Report)

Codeความหมาย
PAGE_MARGIN_T/B/L/Rระยะห่างขอบกระดาษ
HEADER_LEFT/CENTER/RIGHTข้อความ header (เช่น Page [page]/[toPage])
FOOTER_LEFT/CENTER/RIGHTข้อความ footer
GEN_COMMENT1/0 แนบ/ไม่แนบความคิดเห็นในใบปะหน้า

Criteria Config (บังคับ)

Config → Type: Master Type ต้องมี 2 ค่าเสมอ: Code = A และ Code = MAIN

Form & Report Variables

  • ${memoId} — Memo ID
  • ${field1}, ${field2} … — ค่าจาก field ใน Detail
  • ${created_time?["yyyy"]} — ปีที่สร้าง
  • ${running_no?["0000"]} — running number 4 หลัก

🇬🇧 English

Memo Header configuration — the core of BLEAF that defines the behavior of each e-Form workflow type.

Header Structure

Memo Header
├── Detail      ← Fields in the first tab (Memo Type, Team, Title, etc.)
├── Criteria    ← Filter fields in the Memo Search Page
├── Config      ← Config values controlling behavior ← most important
├── Grid Column ← Columns in the Memo Search Page
├── Script      ← JavaScript events
└── Button      ← Custom buttons on the header

Path: Memo → Header → select Header → pencil icon

Detail (Mandatory Fields)

FieldCodeMeaning
Memo TypeMEMO_TYPEType/category of the memo
Requested Timerequested_timeDate the approval was requested
FormFORMATWhich form template to use
Approval MatrixAPPROVAL_MATRIXWhich approval chain to use
WorkflowWORKFLOWWorkflow type
Memo NameMEMO_NAMEDocument name

Field names must not start with S_ or H_.

Config Keys

Button visibility (ACTION_*)

CodeValue(1)Meaning
ACTION_CREATE1/0Show/hide Create button
ACTION_COPY1/0Show/hide Copy icon
ACTION_PREVIEW1/0Show/hide Preview button; Value(2) = button label
ACTION_SAVE1/0Show/hide Save button; Value(2) = button label
ACTION_SEND1/0Show/hide Send button; Value(2) = button label
SEARCH_DELETE_BUTTON1/0Show/hide Delete button in Search (only the requester can delete)

Memo ID Format

CodeMeaning
ID_FORMATRunning number format, e.g. ${field2}-${created_time?["yyyy"]}-${running_no?["0000"]}ASMS-2019-0001
ID_SEQValue(1) = Sequence name; Value(2) = d/y/m (reset daily/yearly/monthly)

Email Notifications (MAIL_*)

CodeMeaning
MAIL_NOTIFY1/0 enable/disable email notifications
MAIL_FROMSender name
MAIL_SUBJECTEmail subject (can use ${memoId} as a variable)
MAIL_TEMPLATENode REF of the email template in Alfresco
MAIL_COMPLETE1/0 notify requester when workflow completes

Folder Path & Storage

CodeMeaning
PATH_FORMATFolder path format in Alfresco, e.g. ${field7}/${created_time?["yyyy"]}/${memoId}
SITE_IDAlfresco Site name where documents are stored
MONITOR_USERLogin username(s) that can see all documents (must be in site_memo_SiteCollaborator group)

Signature (DOC_SIGN_*)

CodeMeaning
DOC_SIGN1/0 attach/do not attach signature to documents
DOC_SIGN_METHOD1 = attach at every approval level; 2 = attach only when final approver approves
SIGN_PIXELSignature image size in pixels

Workflow Behavior (WF_*)

CodeMeaning
CALC_PERCENT_DIVIDE_BY_ZERO1 = verify every task has an approver before proceeding
WF_END_REPLACE_FIELD1/0 replace fields in cover sheet when workflow completes
IMMUTABLE_HEADER_FIELDField names that cannot be edited after submission

Cover Sheet (Report)

CodeMeaning
PAGE_MARGIN_T/B/L/RPage margin: top/bottom/left/right
HEADER_LEFT/CENTER/RIGHTHeader text (e.g. Page [page]/[toPage])
FOOTER_LEFT/CENTER/RIGHTFooter text
GEN_COMMENT1/0 include/exclude comments in cover sheet

Criteria Config (Required)

Config → Type: Master Type must always have exactly two entries: Code = A and Code = MAIN.

Form & Report Variables

  • ${memoId} — the Memo ID
  • ${field1}, ${field2} … — values from Detail fields
  • ${created_time?["yyyy"]} — year of creation
  • ${running_no?["0000"]} — 4-digit running number
  • ${UPLOAD_FILED?["name"]} — name of the attached file