You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

ตัวแปร Hash คืออะไร ?

Definition

ตัวแปร Hash ช่วยให้ผู้ใช้มีความยืดหยุ่นและอิสระมากขึ้นในการเข้าถึงข้อมูลที่เป็นประโยชน์หรือค่าที่เกี่ยวข้องเวลาการทำงานของระบบ

ตัวแปร hash เป็นคีย์หลักพิเศษที่สามารถใช้ได้ใน :

  • ตัวสร้างฟอร์ม (Form Builder)
  • ตัวสร้างดาตาลิสต์ (Datalist Builder)
  • ตัวสร้างมุมมองผู้ใช้ (Userview Builder)
  • คุณสมบัติการกำหนดค่าปลั๊กอินที่สนับสนุน
  • ชื่อกิจกรรมในโปรแกรมออกแบบลำดับงาน
  • URL ของฟอร์มภายนอกเมื่อทำการแม็ปกิจกรรมไปยังฟอร์มภายนอก

เพื่อกลับค่าของตัวแปรรันไทม์ที่มีประโยชน์บางอย่างจากส่วนประกอบ Joget

เพื่อความสะดวกในการเข้าถึงรายการของตัวแปร Hash ทั้งหมดที่มีอยู่ให้ใช้ทางลัด Ctrl-Shift-3 ในส่วนประกอบข้างต้น

ดาวน์โหลดแอพช่วยสอน Hash Variables จาก Joget Workflow Marketplace เพื่อเรียนรู้เพิ่มเติมเกี่ยวกับตัวแปร Hash


ตัวแปร Hash ที่ซ้อนกัน (Nested Hash Variable)

ตัวแปร Hash สามารถใช้ภายใน ตัวแปร Hash อื่นเพื่อสร้าง ตัวแปร Hash ที่ซ้อนกัน

ไวยากรณ์สำหรับตัวแปร Hash ภายในถูกคลุมด้วยคู่ของวงเล็บ { ปีกกา }

Syntax / Format
#prefix.{prefix.variableKey}#
นี่คือตัวอย่างบางส่วน:
Example
#date.{envVariable.dateFormat}#
#user.{variable.username}.firstName#
#form.tableChild.field1[{form.tableParent.childId}]#


Escaping the Resultant Hash Variable

ตัวแปร Hash ที่แยกวิเคราะห์/ส่งคืนอาจทำให้เกิดความเข้ากันไม่ได้กับบริบท/สภาพแวดล้อมปัจจุบันเช่นข้อผิดพลาดทางไวยากรณ์ในสคริปต์

ดังนั้น อาจผ่านหนึ่งในพารามิเตอร์เพิ่มเติมในตัวแปร Hash ประกาศให้เลี่ยงอักขระบางอย่าง

Before ending a hash variable with a hash "#", add a question mark character "?" followed by the required format. You may include multiple by defining semicolon ";" separated values.

ก่อนที่จะสิ้นสุดตัวแปร Hash ด้วย "#" ให้เพิ่มเครื่องหมายคำถาม "?" ตามด้วยรูปแบบที่ต้องการ คุณอาจรวมได้โดยการกำหนดเครื่องหมายอัฒภาค ";" ค่าที่คั่นด้วย

  1. regex - ใช้ในการเลี่ยงนิพจน์ปกติของอักขระพิเศษ
  2. json - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ JSON
  3. javascript - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ Javascript
  4. html - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ HTML
  5. xml - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ XML
  6. java - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ Java
  7. sql - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ SQL
  8. url - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ URL
  9. nl2br - ใช้เพื่อแปลงอักขระบรรทัดใหม่เป็นแท็ก HTML < br >
  10. separator(SEPARATOR_CHARS) - ใช้เพื่อเปลี่ยนตัวคั่นเริ่มต้น ";" เป็น  SEPARATOR_CHARS. eg. ?ตัวคั่น(, ) ส่งผลให้ "abc, def" แทนที่เป็น "abc;def".
Example
#envVariable.script?java#
#envVariable.script?nl2br;json#
#form.table.users?separator(, )#
New Feature

nl2br และตัวคั่นเป็นคุณลักษณะใหม่ใน Joget Workflow v6.


List of Hash Variables


Workflow Assignment Hash Variable

New

New attributes added in Joget Workflow v6.

  • processDefIdWithoutVersion
  • appId
NameDescription
Prefixassignment
Description

To get workflow activity information of the current assignment.

Attributes
  • #assignment.processId#
  • #assignment.processDefId#
  • #assignment.processDefIdWithoutVersion#
  • #assignment.processName#
  • #assignment.processVersion#
  • #assignment.processRequesterId#
  • #assignment.appId#
  • #assignment.activityId#
  • #assignment.activityName#
  • #assignment.activityDefId#
  • #assignment.assigneeId#
Scope of Use
  • Elements within and part of a Process.
    1. Activity Name.
    2. Form mapped as part of process activity mapping.
    3. Email Tool configuration as part of process tool mapping.
Sample Attributes

To display the assignee's name:

#user.{assignment.assigneeId}.firstName# #user.{assignment.assigneeId}.lastName#

Workflow Process Hash Variable

New Feature

This is a new feature in Joget Workflow v6.

NameDescription
Prefixprocess
Description

To retrieve information of a workflow process instance.

Attributes
  • #process.appId#

  • #process.processId#

  • #process.processDefId#

  • #process.processDefIdWithoutVersion#

  • #process.processName#

  • #process.processVersion#

  • #process.processRequesterId#

  • #process.state#

  • #process.startedTime#

  • #process.limit#

  • #process.due#

  • #process.delay#

  • #process.delayInSeconds#

  • #process.finishTime#

  • #process.timeConsumingFromDateStarted#

  • #process.timeConsumingFromDateStartedInSeconds#

  • #process.activityInst.ACTIVITY_DEF_ID.instanceId#

  • #process.activityInst.ACTIVITY_DEF_ID.name#

  • #process.activityInst.ACTIVITY_DEF_ID.status#

  • #process.activityInst.ACTIVITY_DEF_ID.state#

  • #process.activityInst.ACTIVITY_DEF_ID.type#

  • #process.activityInst.ACTIVITY_DEF_ID.startedTime#

  • #process.activityInst.ACTIVITY_DEF_ID.limit#

  • #process.activityInst.ACTIVITY_DEF_ID.limitInSeconds#

  • #process.activityInst.ACTIVITY_DEF_ID.due#

  • #process.activityInst.ACTIVITY_DEF_ID.delay#

  • #process.activityInst.ACTIVITY_DEF_ID.delayInSeconds#

  • #process.activityInst.ACTIVITY_DEF_ID.finishTime#

  • #process.activityInst.ACTIVITY_DEF_ID.timeConsumingFromDateStarted#

  • #process.activityInst.ACTIVITY_DEF_ID.timeConsumingFromDateStartedInSeconds#

  • #process.activityInst.ACTIVITY_DEF_ID.performer#

  • #process.activityInst.ACTIVITY_DEF_ID.performerUser#

  • #process.activityInst.ACTIVITY_DEF_ID.assignmentUsers#


  • #process.appId[PROCESS_INSTANCE_ID]#

  • #process.processDefId[PROCESS_INSTANCE_ID]#

  • #process.processDefIdWithoutVersion[PROCESS_INSTANCE_ID]#

  • #process.processName[PROCESS_INSTANCE_ID]#

  • #process.processVersion[PROCESS_INSTANCE_ID]#

  • #process.processRequesterId[PROCESS_INSTANCE_ID]#

  • #process.startedTime[PROCESS_INSTANCE_ID]#

  • #process.limit[PROCESS_INSTANCE_ID]#

  • #process.due[PROCESS_INSTANCE_ID]#

  • #process.delay[PROCESS_INSTANCE_ID]#

  • #process.delayInSeconds[PROCESS_INSTANCE_ID]#

  • #process.finishTime[PROCESS_INSTANCE_ID]#

  • #process.timeConsumingFromDateStarted[PROCESS_INSTANCE_ID]#

  • #process.timeConsumingFromDateStartedInSeconds[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.instanceId[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.name[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.status[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.state[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.type[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.startedTime[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.limit[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.limitInSeconds[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.due[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.delay[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.delayInSeconds[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.finishTime[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.timeConsumingFromDateStarted[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.timeConsumingFromDateStartedInSeconds[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.performer[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.performerUser[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.assignmentUsers[PROCESS_INSTANCE_ID]#

Scope of Use
  • Elements within and part of a Process.
    1. Activity Name.
    2. Form mapped as part of process activity mapping.
    3. Email Tool configuration as part of process tool mapping.
Sample Attributes

To display the performer username of an activity instance of a process instance:

#process.activityInst.assign.performerUser[{assingment.processId}]#

Current User Hash Variable

NameDescription
PrefixcurrentUser
DescriptionTo retrieve currently logged in user information.  
Attributes
  • #currentUser.id#
  • #currentUser.username#
  • #currentUser.firstName#
  • #currentUser.lastName#
  • #currentUser.email#
  • #currentUser.active#
  • #currentUser.timeZone#

In Joget Enterprise edition, these additional attributes are available:-

User Meta

  • #currentUser.meta.KEY#
    To read additional user meta data stored in dir_user_meta table.
    Example: #currentUser.meta.duration#.

    New Feature

    This is a new feature in Joget Workflow v6.

Organization

  • #currentUser.organization.id#
  • #currentUser.organization.name#
  • #currentUser.organization.description#

Department

  • #currentUser.department.id#
  • #currentUser.department.name#
  • #currentUser.department.description#
  • #currentUser.department.treeStructure#

Grade

  • #currentUser.grade.id#
  • #currentUser.grade.name#
  • #currentUser.grade.description#
  • #currentUser.grade.organizationId#

HOD

  • #currentUser.hod.username#
  • #currentUser.hod.firstName#
  • #currentUser.hod.lastName#
  • #currentUser.hod.email#
  • #currentUser.hod.active#
  • #currentUser.hod.timeZone#

Group

  • #currentUser.groups.id#
  • #currentUser.groups.name#

Employment

  • #currentUser.employee.code#
  • #currentUser.employee.jobTitle#
  • #currentUser.employee.isHod#

Department HOD

  • #currentUser.department.hod.username#
  • #currentUser.department.hod.firstName#
  • #currentUser.department.hod.lastName#
  • #currentUser.department.hod.email#
  • #currentUser.department.hod.active#
  • #currentUser.department.hod.timeZone#
Scope of Use
  • All components within the App.

Date Hash Variable  

NameDescription
Prefixdate
Description

To get date time according to a specified format.

Localization

In Joget Workflow v5, the returned value would follow current logged in user's timezone. If user's information is not available, then it will use server's timezone.

Attributes
  • #date.dateFormat#
  • #date.dateUnit[+-]integerValue.dateFormat#

    Options

    dateFormat

    • In Java date format; e.g., yyyy-MM-dd for 2011-06-01

    dateUnit

    • YEAR
    • MONTH
    • DAY

    integerValue

    • Numeric integer value. E.g. 10
  • #date.DATE_FORMAT_TO[INPUT_DATE_VALUE | INPUT_VALUE_FORMAT]#

    INPUT_DATE_VALUE accepts any date value and even nested hash variables, e.g: form data hash variable. See example in sample attributes below.

    INPUT_VALUE_FORMAT is the INPUT_DATE_VALUE original format.

    DATE_FORMAT_TO defines the format to change to.

    New Feature

    This is a new feature in Joget Workflow v6.


Scope of Use
  • All components within the App.
Sample Attributes

#date.h:mm a# // shows current time of 12:08 PM

#date.EEE,d MMM yyyy h:mm:ss a# // shows current date time of Wed, 4 Jul 2014 12:08:56 PM

#date.DAY+7.EEE,d MMM yyyy h:mm:ss a# // Add 7 days on top of current date time - Wed, 11 Jul 2014 12:08:56 PM

#date.DAY-1.EEE,d MMM yyyy h:mm:ss a# // Minus 1 days on top of current date time - Wed, 3 Jul 2014 12:08:56 PM

#date.dd-MM-yyyy[{form.j_expense_claim.title}|yyyy-MM-dd]# // Retrieves date from j_expense_claim table, form field title, changes its origin format of yyyy-MM-dd to dd-MM-yyyy.

Environment Variable Hash Variable  

NameDescription
PrefixenvVariable
Description

To retrieve Environment Variable value. Learn more about Environment Variables .

Attributes
  • #envVariable. keyName #
Scope of Use
  • Anywhere within the Joget app itself. (i.e. Process, Process Tool, Form, List, Userview)
Sample Attributes#envVariable.smtpServer#
#envVariable.smtpPort#

Form Data Hash Variable  

NameDescription
Prefixform
Description

To get field value from form table.

Attributes
  • #form. tableName . fieldId #
  • #form. tableName . fieldId [recordId]# (Available in 3.1 and above)
Scope of Use
  • In a Process Tool part of a Process.
  • In a Form.
  • In a process design.
Sample Attributes#form.registration.registeredDate# //will use the current record ID
#form.registration.registeredDate[ 0001 ]# //0001 is the record ID to seek for
#form.registration.registeredDate[{variable.recordId}]# //using nested Hash Variable with curly bracket.

Form Binder Hash Variable

New Feature

This is a new feature in Joget Workflow v6.

NameDescription
Prefixbinder
Description

To get field value or field value label from the binder of a form via its form definition id .

The 'binder' prefix retrieves the field value, while the 'binder.options' prefix retrieves the lookup field (eg. select box, checkbox & radio button) option label.

The field value or field value label can also be obtained from other apps by including the APP_ID, else it uses the current app context.

By providing the PRIMARY_KEY argument, field value or field value label from a different record can be retrieved, else data from the current record id is retrieved instead.

Attributes
  • #binder.APP_ID.FORM_DEF_ID.FIELD_ID#
  • #binder.APP_ID.FORM_DEF_ID.FIELD_ID[PRIMARY_KEY]#
  • #binder.FORM_DEF_ID.FIELD_ID#
  • #binder.FORM_DEF_ID.FIELD_ID[PRIMARY_KEY]#
  • #binder.options.APP_ID.FORM_DEF_ID.FIELD_ID#
  • #binder.options.APP_ID.FORM_DEF_ID.FIELD_ID[PRIMARY_KEY]#
  • #binder.options.FORM_DEF_ID.FIELD_ID#
  • #binder.options.FORM_DEF_ID.FIELD_ID[PRIMARY_KEY]#
Scope of Use
  • In a Process Tool part of a Process.
  • In a Form.
  • In a process design.
Sample Attributes

#binder.addCard.title#

#binder.cardViewer.addCard.title#

#binder.cardViewer.addCard.title[b30bce20-c0a82095-14976e70-fded1735]#

#binder.options.addCard.title#

#binder.options.cardViewer.addCard.title#

#binder.options.cardViewer.addCard.title[b30bce20-c0a82095-14976e70-fded1735]#

App Definition Hash Variable

New Feature

This is a new feature in Joget Workflow v6.

NameDescription
PrefixappDef
Description

To retrieve App Definition information

Attributes
  • #appDef.appId#

  • #appDef.dateCreated#

  • #appDef.dateModified#

  • #appDef.version#

  • #appDef.license#

  • #appDef.name#

  • #appDef.published#

Scope of Use
  • All components within the App.
Sample Attributes

To display the app definition name:

#appDef.name#

ตัวแปรแฮชข้อความของแอป (App Message Hash Variable) (Internationalization)  

ชื่อคำอธิบาย
Prefixi18n
Description

เพื่อสนับสนุนการแปลภาษาในระดับแอพลิเคชัน

Attributes
  • #i18n. keyName #
Scope of Use
  • ส่วนประกอบทั้งหมดภายใน App
Sample Attributes

#i18n.logout#

Exampleโปรดดูที่ Add Message.

ตัวแปรแฮชของผู้กระทำ (Performer Hash Variable ) 

ชื่อคำอธิบาย
Prefixperformer
Description

เพื่อรับข้อมูลผู้ใช้ของผู้กระทำของกิจกรรม

Attributes
  • #performer. activityDefId .id#
  • #performer. activityDefId .username#
  • #performer. activityDefId .firstName#
  • #performer. activityDefId .lastName#
  • #performer. activityDefId .email#
  • #performer. activityDefId .active#
  • #performer. activityDefId .timeZone#
Scope of Use
  • องค์ประกอบภายในและเป็นส่วนหนึ่งของกระบวนการ

    1. ชื่อกิจกรรม
    2. แบบฟอร์มที่แมปเป็นส่วนหนึ่งของแมปกิจกรรมของกระบวนการ
    3. การกำหนดเครื่องมืออีเมล์เป็นส่วนหนึ่งของการแมปเครื่องมือกระบวนการ

เพื่อรับ activityDefId (รหัสข้อกำหนดของกิจกรรม) ให้วางเมาส์เหนือชื่อกิจกรรมในแท็บการแม็ปกิจกรรม (การควบคุมการจัดการเวิร์กโฟลว์) จะมีการซ้อนทับแสดง ID

กิจกรรมที่เลือกจะต้องได้รับการดำเนินการแล้ว

Sample Attributes
  • #performer.runProcess.firstName#
  • #performer.submitLeave.firstName#

ตัวแปรแฮชของการร้องขอพารามิเตอร์ (Request Parameter Hash Variable)   

ชื่อคำอธิบาย
PrefixrequestParam
Description

ในการเข้าถึงค่าของการร้องขอพารามิเตอร์

Attributes
  • #requestParam.parameterName[separator]#
  • ตัวคั่น (หรือ;) สามารถระบุได้ว่าการร้องขอใช้ในตัวกรองข้อมูลที่มีหลายค่าเพื่อกำหนดอักขระตัวคั่นในเอาต์พุตข้อมูล เครื่องหมายจุลภาค ","จะใช้เป็นค่าเริ่มต้นถ้าไม่มีการระบุตัวคั่น
Scope of Use
  • ส่วนประกอบทั้งหมดภายใน App
Sample Attributes
  • #requestParam.key# สามารถนำมาใช้โดยเฉพาะเพื่อรับ Userview Key value.
  • #requestParam.name[;]# เพื่อระบุตัวแปร 'name' จะเก็บค่าหลายค่าคั่นด้วยเครื่องหมายอัฒภาค ตัวอย่างเช่นคำสั่ง SQL นี้ "select * from expenses where title in (#requestParam.title[,]#)" จะได้รับการแปลเป็น  "select * from expenses where title in (a,b,c)" เพื่อรองรับหลายค่าในคำสั่ง "where-in" 
  • ในเพจ Userview อาจเข้าถึงแอตทริบิวต์ต่อไปนี้
    • #requestParam.key#
    • #requestParam.userviewId#
    • #requestParam.menuId#
    • #requestParam.appId#

ตัวแปรแฮชของผู้ใช้ (User Hash Variable)   

ชื่อคำอธิบาย
Prefixuser
Description

เพื่อรับข้อมูลผู้ใช้โดยอิงจาก username.

Attributes
  • #user. username .id#
  • #user. username .username#
  • #user. username .firstName#
  • #user. username .lastName#
  • #user. username .email#
  • #user. username .active#
  • #user. username .timeZone#

ใน Joget Enterprise edition แอตทริบิวต์เพิ่มเติมเหล่านี้จะพร้อมใช้งาน:-

User Meta

  • #user. username .meta.KEY#
    ในการอ่านข้อมูลเมตาของผู้ใช้เพิ่มเติมที่เก็บไว้ในตาราง dir_user_meta 
    ตัวอย่าง: #user.cat.meta.duration# จะรีเทิร์นค่า "100".

Organization

  • #user. username .organization.id#
  • #user. username .organization.name#
  • #user. username .organization.description#

Department

  • #user. username .department.id#
  • #user. username .department.name#
  • #user. username .department.description#
  • #user. username .department.treeStructure#

Grade

  • #user. username .grade.id#
  • #user. username .grade.name#
  • #user. username .grade.description#
  • #user. username .grade.organizationId#

HOD

  • #user. username .hod.username#
  • #user. username .hod.firstName#
  • #user. username .hod.lastName#
  • #user. username .hod.email#
  • #user. username .hod.active#
  • #user. username .hod.timeZone#

Group

  • #user. username .groups.id#
  • #user. username .groups.name#

Employment

  • #user. username .employee.code#
  • #user. username .employee.jobTitle#
  • #user. username .employee.isHod#

Department HOD

  • #user. username .department.hod.username#
  • #user. username .department.hod.firstName#
  • #user. username .department.hod.lastName#
  • #user. username .department.hod.email#
  • #user. username .department.hod.active#
  • #user. username .department.hod.timeZone#
Scope of Use
  • ส่วนประกอบทั้งหมดภายใน App
Sample Attributes
  • #user.admin.email#
  • #user.cat.firstName#
  • #user.{requestParam.username}.email# เพื่อดึงที่อยู่อีเมลของผู้ใช้ที่ส่งผ่านพารามิเตอร์ url

ตัวแปรแฮชของ Userview Key (Userview Key Hash Variable)   

ชื่อคำอธิบาย
PrefixuserviewKey
Description

ตัวแปรแฮชของ Userview Key ถูกใช้เพื่อวัตถุประสงค์ในการเข้าถึง Userview key's value ปัจจุบันเท่านั้น

กรณีการใช้งานทั่วไปสำหรับตัวแปร hash นี้คือ:-

  • การกรองข้อมูลตาม Userview Key
  • การโหลดล่วงหน้าฟิลด์ข้อมูลฟอร์มบางอย่าง (เช่นฟอร์มย่อย) ในแบบฟอร์มหรือส่วนหนึ่งของผังกระบวนการตาม Userview Key
Attributes
  • #userviewKey#
Scope of Use

ตัวแปรแฮชของตัวแปรเวิร์กโฟลว์ (Workflow Variable Hash Variable)

ชื่อคำอธิบาย
Prefixvariable
Description

เพื่อรับค่าของตัวแปรเวิร์กโฟลว์ใน Process Flow

Attributes
  • #variable. variableName #
Scope of Use
  • องค์ประกอบภายในและเป็นส่วนหนึ่งของกระบวนการ

    1. ชื่อกิจกรรม
    2. แบบฟอร์มที่แมปเป็นส่วนหนึ่งของแมปกิจกรรมของกระบวนการ
    3. การกำหนดเครื่องมืออีเมล์เป็นส่วนหนึ่งของการแมปเครื่องมือกระบวนการ
Sample Attributes#variable.approvalStatus#

Request Hash Variable

ชื่อคำอธิบาย
Prefixrequest
Description

เพื่อรับค่าจากวัตถุ HttpServletRequest ปัจจุบันของมุมมองเพจ

Attributes
  • #request.characterEncoding#
  • #request.contextPath#
  • #request.header.NAME# , โดยที่ NAME เป็นชื่อส่วนหัวที่กำหนดเอง
  • #request.locale#
  • #request.method#
  • #request.pathInfo#
  • #request.protocol#
  • #request.queryString#
  • #request.remoteAddr#
  • #request.requestURI#
  • #request.requestURL#
  • #request.requestedSessionId#
  • #request.scheme#
  • #request.serverName#
  • #request.serverPort#
  • #request.servletPath#
Scope of Use
  • ส่วนประกอบทั้งหมดภายใน App ที่มีวัตถุ Httpservletrequest ที่ถูกต้อง วัตถุดังกล่าวจะไม่พร้อมใช้งานในกิจกรรมพื้นหลังเช่นในเครื่องมือกระบวนการที่ทริกเกอร์เป็นผลมาจากกำหนดเวลา
Sample Attributes

เมื่อต้องการดึงค่าแอตทริบิวต์ส่วนหัว "อ้างถึง" ในภาพหน้าจอด้านบนหนึ่งอาจใช้ตัวแปร hash ต่อไปนี้

Hash Variable
#request.header.Referer#

ตัวแปรแฮชของแพลตฟอร์ม (Platform Hash Variable)

New Feature

นี่คือฟีเจอร์ใหม่ใน Joget Workflow v6

ชื่อคำอธิบาย
Prefixplatform
Descriptionเพื่อเรียกข้อมูลเฉพาะแพลตฟอร์ม
Attributes
  • #platform.name#

  • #platform.version#

  • #platform.jdbcDriver#

  • #platform.setting.dataFileBasePath#

  • #platform.setting.deadlineCheckerInterval#

  • #platform.setting.defaultUserview#

  • #platform.setting.fileSizeLimit#

  • #platform.setting.landingPage#

  • #platform.setting.systemDateFormat#

  • #platform.setting.systemLocale#

  • #platform.setting.systemTimeZone# 

ใน Joget Enterprise edition แอตทริบิวต์เพิ่มเติมเหล่านี้จะพร้อมใช้งาน:-

  • #platform.license.name#

  • #platform.license.holder#

  • #platform.license.users#

  • #platform.license.appLimit#

  • #platform.license.expiry#

  • #platform.license.activated#

  • #platform.systemKey#

Scope of Use
  • ส่วนประกอบทั้งหมดภายใน App

ตัวแปรแฮชของผู้ใช้ (Users Hash Variable)

New Feature

นี่คือฟีเจอร์ใหม่ใน Joget Workflow v6

ชื่อคำอธิบาย
Prefixusers
Descriptionเพื่อดึงข้อมูลของผู้ใช้ทั้งหมดในกลุ่ม, เกรด, แผนกและองค์กรที่เลือก ผลลัพธ์หลายจะถูกคั่นด้วยเครื่องหมายอัฒภาค
Attributes
  • #users.group.GROUP_ID.username#

  • #users.group.GROUP_ID.firstName#

  • #users.group.GROUP_ID.lastName#

  • #users.group.GROUP_ID.fullName#

  • #users.group.GROUP_ID.email#

  • #users.grade.GRADE_ID.username#

  • #users.grade.GRADE_ID.firstName#

  • #users.grade.GRADE_ID.lastName#

  • #users.grade.GRADE_ID.fullName#

  • #users.grade.GRADE_ID.email#

  • #users.department.DEPARTMENT_ID.username#

  • #users.department.DEPARTMENT_ID.firstName#

  • #users.department.DEPARTMENT_ID.lastName#

  • #users.department.DEPARTMENT_ID.fullName#

  • #users.department.DEPARTMENT_ID.email#

  • #users.organization.ORGANIZATION_ID.username#

  • #users.organization.ORGANIZATION_ID.firstName#

  • #users.organization.ORGANIZATION_ID.lastName#

  • #users.organization.ORGANIZATION_ID.fullName#

  • #users.organization.ORGANIZATION_ID.email#

Scope of Use
  • ส่วนประกอบทั้งหมดภายใน App
Sample Attributes

หากต้องการส่งคืนผู้ใช้ทั้งหมดในรหัสกลุ่มของผู้ใช้ปัจจุบัน:

ตัวแปรแฮชของ Bean Shell (Bean Shell Hash Variable)

New Feature

นี่คือฟีเจอร์ใหม่ใน Joget Workflow v6

ชื่อคำอธิบาย
Prefixbeanshell
Descriptionการใช้ตัวแปรสภาพแวดล้อมเพื่อรันสคริปต์ Bean Shell ส่งผ่านพารามิเตอร์โดยใช้ไวยากรณ์สตริงค้นหา URL
Attributes
  • #beanshell.ENVIRONMENT_VARIABLE#

  • #beanshell.ENVIRONMENT_VARIABLE[PARAMETERS_URL_QUERY_STRING]#

Scopeof Use
  • ส่วนประกอบทั้งหมดภายใน App
Sample Attributes

การเรียกใช้สคริปต์ที่เก็บไว้ใน "ยินดีต้อนรับ"ตัวแปรสภาพแวดล้อมที่มีพารามิเตอร์ "username" และ "dept":

if (username != null && username.length == 1 && !username[0].isEmpty()) {
       return "Welcome " + username[0] + " (" + dept[0] + "),";
} else {
       return "";
}
  • #beanshell.welcome[username={currentUser.username}&dept={currentUser.department.name}]#




  • No labels