Table of Contents |
---|
outline | true |
---|
absoluteUrl | true |
---|
|
...
什么是哈希变量?
Panel |
---|
borderColor | green |
---|
borderWidth | 1 |
---|
titleBGColor | #ddffcc |
---|
borderStyle | solid |
---|
title | Definition |
---|
|
Hash Variables gives users greater flexibility and freedom in accessing useful information or relevant run-time values from the system. |
A hash variable is a special hash-escaped keyword that can be used in :
- Form Builder
- Datalist Builder
- Userview Builder
- Supported plugin configuration properties
- Activity name in Workflow Designer
- External Form URL when mapping an activity to an external form
to return the value of some useful runtime variables from Joget components.
Tip |
---|
To conveniently access the list of all hash variables available, use shortcut combination Ctrl-Shift-3 in any of the components above. |
Tip |
---|
Download the tutorial app on Hash Variables from Joget Workflow Marketplace to learn more about Hash Variable. |
Nested Hash Variable
Since version 3.0.3, a Hash Variable can be used inside another Hash Variable to form a Nested Hash Variable.
|
哈希变量 为用户提供更大的灵活性和自由从系统访问有用的信息或相关的运行时间值。 |
哈希变量是一个特殊的哈希转义关键字,可用于:
- 表单生成器
- 数据主义生成器
- Userview生成器
- 支持的插件配置属性
- 工作流设计器中的活动名称
- 将活动映射到外部表单时的外部表单URL
从Joget组件返回一些有用的运行时变量的值。
Tip |
---|
为了方便地访问所有可用散列变量的列表,可以在上面的任何组件中使用快捷键组合Ctrl-Shift-3 。 |
Tip |
---|
从 Joget Workflow Marketplace 下载Hash变量的教程应用程序, 以了解更多关于Hash变量的信息。 |
嵌套哈希变量
从版本3.0.3开始,哈希变量可以在另一个哈希变量中使用,形成一个嵌套哈希变量。
内部哈希变量的语法由一对大括号包围。The syntax for the inner Hash Variable is wrapped by a pair of curly bracket.
Code Block |
---|
language | java |
---|
title | Syntax / Format |
---|
|
#prefix.{prefix.variableKey}# |
Here's some examples:这里有一些例子:
Code Block |
---|
|
#date.{envVariable.dateFormat}#
#user.{variable.username}.firstName#
#form.tableChild.field1[{form.tableParent.childId}]# |
Escaping the Resultant Hash Variable
The parsed/returned Hash Variable may cause incompatibility with the current context/environment such as syntax error in a script. Therefore, one may pass in additional parameters into the hash variable declared to escape certain characters.
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.
- regex
- json
- javascript
- html
- xml
- java
- sql
- url
转义哈希变量结果
解析/返回的哈希变量可能会导致与当前上下文/环境(如脚本中的语法错误)不兼容。因此,可以将附加参数传递给声明的哈希变量来转义某些字符。
在使用散列“#”结束散列变量之前,添加一个问号字符“?”并紧接着其所需的格式。你可以通过定义分号“;”来包含多个分隔值 。
- regx - 用于转义正则表达式特殊字符
- json - 用于转义JSON特殊字符
- javascript - 用于转义Javascript特殊字符
- html - 用于转义HTML特殊字符
- xml - 用于转义XML特殊字符
- java - 用于转义Java特殊字符
- sql - 用于转义SQL特殊字符
- url - 用于转义URL特殊字符
- nl2br - 用于将新行字符转换为<br> HTML标记
- separator(SEPARATOR_CHARS) - 用于更改默认分隔符 “;” 到 SEPARATOR_CHARS。例如 ?separator(, ) ,会使 "abc;def" 变成 "abc,def"。
Code Blockcode |
---|
|
#envVariable.script?java# |
...
#envVariable.script?nl2br;json#
#form.table.users?separator(, )# |
哈希变量列表
Workflow Assignment Hash Variable
流程任务哈希变量
名称 | 描述 |
---|
字首 |
Name | Description |
---|
Prefix | assignment |
Description | To get workflow activity information of the current assignment. |
描述 | 获取当前分配的工作流任务信息。 |
属性Attributes | - #assignment.processId#
- #assignment.processDefId#
- #assignment.processDefIdWithoutVersion# (v6)
- #assignment.processName#
- #assignment.processVersion#
- #assignment.processRequesterId#
- #assignment.description#appId# (v6)
- #assignment.activityId#
- #assignment.activityName#
- #assignment.activityDefId#
- #assignment.assigneeId#
|
Scope of Use | - Elements within and part of a Process.
- Activity Name.
- Form mapped as part of process activity mapping.
- Email Tool configuration as part of process tool mapping.
|
Current User Hash Variable
Name | Description |
---|
Prefix | currentUser |
Description | To 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 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
Name | Description |
---|
Prefix | date |
Description | To get date time according to a specified format. Info |
---|
| 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 #
Info |
---|
| dateFormat - In Java date format; e.g., yyyy-MM-dd for 2011-06-01
dateUnit integerValue - Numeric integer value. E.g. 10
|
|
Scope of Use | - All components within the App.
|
Sample Attributes | #date.h:mm a# #date.EEE,d MMM yyyy h:mm:ss a#
#date.DAY+ 7 .EEE,d MMM yyyy h:mm:ss a#
#date.DAY- 1 .EEE,d MMM yyyy h:mm:ss a#
|
Environment Variable Hash Variable
Name | Description |
---|
Prefix | envVariable |
Description | To retrieve Environment Variable value. Learn more about Environment Variables . |
Attributes | |
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
Name | Description |
---|
Prefix | form |
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}]#
|
App Message Hash Variable (Internationalization)
Name | Description |
---|
Prefix | i18n |
Description | To support language localization on application level. |
Attributes | |
Scope of Use | - All components within the App.
|
Sample Attributes | #i18n.logout# Image Removed |
Example | Please see Add Message. |
Performer Hash Variable
Name | Description |
---|
Prefix | performer |
Description | To get user information of the performer of an activity. |
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 | - Elements within and part of a Process.
- Activity Name.
- Form mapped as part of process activity mapping.
- Email Tool configuration as part of process tool mapping.
Info |
---|
To get activityDefId (activity definition ID), mouseover the activity name in the Activity Mapping tab (Workflow Management Console); there will be an overlay showing the ID. |
Warning |
---|
The activity chosen must had already been performed. |
|
Sample Attributes | - #performer.runProcess.firstName#
- #performer.submitLeave.firstName#
|
Request Parameter Hash Variable
Name | Description |
---|
Prefix | requestParam |
Description | To access request parameter' values. |
Attributes | - #requestParam.parameterName[separator]#
- Separator (, or ;) can be indicated if requestParam is used in datalist filter with multiple values, to define the separator character in data output. Comma "," is used as default if no separator is indicated in cases of multiple values.
|
Scope of Use | - All components within the App.
|
Sample Attributes | - #requestParam.key# can be used specifically to obtain Userview Key value.
- #requestParam.name[;]# to indicate 'name' variable will store multiple values separated by semicolon. For example, this SQL statement "select * from expenses where title in (#requestParam.title[,]#)" will be translated to "select * from expenses where title in (a,b,c)" to cater for multiple values in "where-in" statement.
- In a Userview page, one may access the following attributes.
- #requestParam.key#
- #requestParam.userviewId#
- #requestParam.menuId#
- #requestParam.appId#
|
User Hash Variable
Name | Description |
---|
Prefix | user |
Description | To get user information based on username. |
Attributes | - #user. username .id#
- #user. username .username#
- #user. username .firstName#
- #user. username .lastName#
- #user. username .email#
- #user. username .active#
- #user. username .timeZone#
In Joget Enterprise edition, these additional attributes are available:- User Meta - #user. username .meta.KEY#
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 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 | - All components within the App.
|
Sample Attributes | - #user.admin.email#
- #user.cat.firstName#
- #user.{requestParam.username}.email# to retrieve the email address of the user passed via url parameter
|
Userview Key Hash Variable
Name | Description |
---|
Prefix | userviewKey |
Description | Userview Key Hash Variable is used solely for the purpose of accessing the current Userview key's value. Typical use case for this hash variable are:- - Filtering a Datalist based on Userview Key.
- Preloading certain form data field (e.g. subform) in a Form or Form part of a process flow based on Userview Key.
|
Attributes | |
Scope of Use | |
Workflow Variable Hash Variable
Name | Description |
---|
Prefix | variable |
Description | To get the value of a workflow variable in a Process Flow. |
Attributes | - #variable. variableName #
|
Scope of Use | - Elements within and part of a Process.
- Activity Name.
- Form mapped as part of process activity mapping.
- Email Tool configuration as part of process tool mapping.
|
Sample Attributes | #variable.approvalStatus# |
Request Hash Variable
Name | Description |
---|
Prefix | request |
Description | To get the value from the current HttpServletRequest object of the page view. |
Attributes | - #request.characterEncoding#
- #request.contextPath#
- #request.header.NAME#
NAME is the custom header 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 | - All components within the App where there is valid HttpServletRequest object. Such object will not be available in background activity such as in Process Tool triggered as a result of Deadlines.
|
Sample Attributes | Image Removed To retrieve the "Referer" header attribute value in the screenshot above, one may use the following hash variable. Code Block |
---|
| #request.header.Referer# |
|
Platform Hash Variable
Panel |
---|
borderColor | red |
---|
borderWidth | 1 |
---|
titleBGColor | #ffcccc |
---|
borderStyle | solid |
---|
title | New Feature |
---|
|
This is a new feature in Joget Workflow v6. |
...
#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#
In Joget Enterprise edition, these additional attributes are available:-
#platform.license.name#
#platform.license.holder#
#platform.license.users#
#platform.license.appLimit#
#platform.license.expiry#
#platform.license.activated#
#platform.systemKey#
|
使用范围 | - 过程中的元素和部分。
- 活动名称。
- 表单映射为流程活动映射的一部分。
- 电子邮件工具配置作为过程工具映射的一部分
|
样例 | 显示被指派人的姓名 #user.{assignment.assigneeId}.firstName# #user.{assignment.assigneeId}.lastName# |
流程信息哈希变量
Panel |
---|
borderColor | purple |
---|
borderWidth | 1 |
---|
titleBGColor | #ddccff |
---|
borderStyle | solid |
---|
title | New Feature |
---|
|
这是 Joget Workflow v6 新功能 |
名称 | 描述 |
---|
字首 | process |
描述 | 获取流程实例的信息 |
属性 | #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]#
|
适用范围 | - 流程中的元素.
- 活动名称.
- 匹配到活动的表单.
- 匹配到1个流程的邮件工具.
|
样例 | 显示一个流程实例的当前执行用户: #process.activityInst.assign.performerUser[{assingment.processId}]# |
当前用户哈希变量
名称 | 描述 |
---|
字首 | currentUser |
描述 | 获取当前登录的用户信息 |
属性 | - #currentUser.id#
- #currentUser.username#
- #currentUser.firstName#
- #currentUser.lastName#
- #currentUser.email#
- #currentUser.active#
- #currentUser.timeZone#
在Joget企业版中,这些附加属性是可用的: - 用户元 组织 - #currentUser.organization.id#
- #currentUser.organization.name#
- #currentUser.organization.description#
部 - #currentUser.department.id#
- #currentUser.department.name#
- #currentUser.department.description#
- #currentUser.department.treeStructure#
年级 - #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#
组 - #currentUser.groups.id#
- #currentUser.groups.name#
雇用 - #currentUser.employee.code#
- #currentUser.employee.jobTitle#
- #currentUser.employee.isHod#
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#
|
使用范围 | |
日期哈希变量
名称 | 描述 |
---|
字首 | date |
描述 | 根据指定的格式获取 日期时间。 Info |
---|
| 在Joget Workflow v5中,返回的值将跟随当前登录用户的时区。如果用户的信息不可用,那么它将使用服务器的时区。 |
|
属性 | |
使用范围 | |
示例属性 | #date.h:mm a# // 12:08 PM #date.EEE,d MMM yyyy h:mm:ss a# // 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. |
环境变量哈希变量
名称 | 描述 |
---|
字首 | envVariable |
描述 | 检索环境变量值。了解有关环境变量的更多信息。 |
属性 | |
使用范围 | - 在Joget应用程序本身的任何地方。(即流程,流程工具,表单,列表,用户视图)
|
示例属性 | #envVariable.smtpServer# #envVariable.smtpPort#
|
表单数据哈希变量
名称 | 描述 |
---|
字首 | form |
描述 | 从 表单(数据表)中 获取 字段值。 |
属性 | - #from.tableName.fieldId#
- #from.tableName.fieldId [ recordId ]#(3.1以上版本)
|
使用范围 | - 在Process中的Process Tool部分。
- 在表单中。
- 在流程设计中。
|
示例属性 | #form.registration.registeredDate# //will use the current record ID #form.registration.registeredDate[ 0001 ]# //registration 表中ID为0001的registeredDate值
#form.registration.registeredDate[{variable.recordId}]#
|
表单绑定哈希变量
Panel |
---|
borderColor | purple |
---|
borderWidth | 1 |
---|
titleBGColor | #ddccff |
---|
borderStyle | solid |
---|
title | New Feature |
---|
|
这是 Joget Workflow v6 新功能 |
名称 | 描述 |
---|
首字 | binder |
描述 | 通过 表单定义ID 获取 字段值 或 字段值标签 To get field value or field value label from the binder of a form via its form definition id . 前缀为 'binder' 代表获取字段值, 而 'binder.options' 代表获取选项标签 (eg. select box, checkbox & radio button). 也可以通过加入 APP_ID 跨应用获取 字段值 或 或字段标签, 否则默认获取当前应用的值. 通过 PRIMARY_KEY , 可以获取指定记录的 字段值 或 字段标签 . |
属性 | - #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]#
|
适用范围 | |
样例 | #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]# |
应用定义哈希变量
Panel |
---|
borderColor | purple |
---|
borderWidth | 1 |
---|
titleBGColor | #ddccff |
---|
borderStyle | solid |
---|
title | New Feature |
---|
|
这是 Joget Workflow v6 新功能 |
名称 | 描述 |
---|
首字 | appDef |
说明 | To retrieve App Definition information |
属性 | #appDef.appId# #appDef.dateCreated# #appDef.dateModified# #appDef.version# #appDef.license# #appDef.name# #appDef.published#
|
适用范围 | |
样例 | 显示应用名称: #appDef.name# |
应用消息哈希变量(国际化)
名称 | 描述 |
---|
字首 | i18n |
描述 | 在应用程序级别支持语言本地化。 |
属性 | |
使用范围 | |
示例属性 | #i18n.logout# Image Added |
例 | 请参阅 添加消息。 |
执行者哈希变量
名称 | 描述 |
---|
字首 | performer |
描述 | 获取活动执行者的用户信息。 |
属性 | - #performer. activityDefId .id#
- #performer. activityDefId .username#
- #performer. activityDefId .firstName#
- #performer. activityDefId .lastName#
- #performer. activityDefId .email#
- #performer. activityDefId .active#
- #performer. activityDefId .timeZone#
|
使用范围 | - 过程中的元素和部分。
- 活动名称。
- 表单映射为流程活动映射的一部分。
- 电子邮件工具配置作为过程工具映射的一部分
Info |
---|
要获取activityDefId(活动定义ID),请在“活动映射”选项卡(工作流程管理控制台)中将活动名称鼠标悬停; 会有覆盖显示ID。 |
|
示例属性 | - #performer.runProcess.firstName#
- #performer.submitLeave.firstName#
|
请求参数哈希变量
名称 | 描述 |
---|
字首 | requestParam |
描述 | 访问请求参数的值。 |
属性 | - #requestParam.parameterName [分隔符]#
- 如果在具有多个值的数据列表过滤器中使用requestParam,则可以指示分隔符(, 或 ;),以便在数据输出中定义分隔符。如果在多个值的情况下不指定分隔符,则使用逗号“,”作为默认值。
|
使用范围 | |
示例属性 | - #requestParam.key#可以专门用于获取 UserView Key值。
- #requestParam.name[;]#表示“name”变量将存储以分号分隔的多个值。例如,这个SQL语句“select * from expenses where title in(#requestParam.title[,]#)”将被转换为“select * from(where a,b,c)中的标题”以满足多个值在“where-in”声明中。
- 在用户视图页面中,可以访问以下属性。
- #requestParam.key#
- #requestParam.userviewId#
- #requestParam.menuId#
- #requestParam.appId#
|
用户哈希变量
名称 | 描述 |
---|
字首 | user |
描述 | 要根据用户名获取用户信息。 |
属性 | - #user. username .id#
- #user. username .username#
- #user. username .firstName#
- #user. username .lastName#
- #user. username .email#
- #user. username .active#
- #user. username .timeZone#
在Joget企业版中,这些附加属性是可用的: - 用户元 - #user. username .meta.KEY# (v6)
组织 - #user. username .organization.id#
- #user. username .organization.name#
- #user. username .organization.description#
部 - #user. username .department.id#
- #user. username .department.name#
- #user. username .department.description#
- #user. username .department.treeStructure#
岗级 - #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#
组 雇用 - #user. username .employee.code#
- #user. username .employee.jobTitle#
- #user. username .employee.isHod#
部门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#
|
使用范围 | |
示例属性 | - #user.admin.email#
- #user.cat.firstName#
- #user.{requestParam.username} .email#检索通过url参数传递的用户的电子邮件地址
|
Userview Key哈希变量
名称 | 描述 |
---|
字首 | userviewKey |
描述 | 用户视图密钥散列变量仅用于访问当前用户 Userview Key。 这个哈希变量的典型用例是: - 数据列表 基于用户视图的关键字段。
- 在基于UserView Key 的过程流程的表单或表单分区预加载某些表单数据字段(例如子表单)。
|
属性 | |
使用范围 | |
工作流变量哈希变量
名称 | 描述 |
---|
字首 | variable |
描述 | 在Process Flow中获取工作流程变量的值。 |
属性 | |
使用范围 | - 过程中的元素和部分。
- 活动名称。
- 表单映射为流程活动映射的一部分。
- 电子邮件工具配置作为过程工具映射的一部分
|
示例属性 | #variable.approvalStatus# |
请求哈希变量
名称 | 描述 |
---|
字首 | request |
描述 | 从页面视图的当前 HttpServletRequest对象获取值 。 |
属性 | - #request.characterEncoding#
- #request.contextPath#
- #request.header.NAME# , NAME 是客户化 header 名称.
- #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#
|
使用范围 | - App中的所有组件都有有效的HttpServletRequest对象。这样的对象不能在后台活动中使用,例如由于截止时间而触发的过程工具。
|
示例属性 | Image Added 要检索上面屏幕截图中的“Referer”标题属性值,可以使用下面的散列变量。 Code Block |
---|
| #request.header.Referer# |
|
平台哈希变量
Panel |
---|
borderColor | red |
---|
borderWidth | 1 |
---|
titleBGColor | #ffcccc |
---|
borderStyle | solid |
---|
title | New Feature |
---|
|
这是Joget Workflow v6中的一个新功能。 |
名称 | 描述 |
---|
字首 | platform |
描述 | 获取当前平台的信息。 |
属性 | #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企业版中,以下属性可用: #platform.license.name# #platform.license.holder# #platform.license.users# #platform.license.appLimit# #platform.license.expiry# #platform.license.activated# #platform.systemKey#
|
使用范围 | |
多用户哈希变量
Panel |
---|
borderColor | purple |
---|
borderWidth | 1 |
---|
titleBGColor | #ddccff |
---|
borderStyle | solid |
---|
title | New Feature |
---|
|
这是Joget Workflow v6新功能 |
名称 | 描述 |
---|
首字 | users |
描述 | 获取指定用户组,岗级,部门,组织的用户,以 “;” 分隔. |
属性 | #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#
|
适用范围 | |
样例 | 获取当前用户所在用户组的所有用户: |
Bean Shell哈希变量
...
Panel |
---|
borderColor | purple |
---|
borderWidth | 1 |
---|
titleBGColor | #ddccff |
---|
borderStyle | solid |
---|
title | New Feature |
---|
|
This is a new feature in Joget Workflow v6. |
这是Joget Workflow v6中的一个新功能。 |
名称 | 描述 |
---|
字首 | BeanShell |
描述 | 使用环境变量来执行bean shell脚本。使用URL查询字符串语法传递参数。 |
属性 |
Name | Description |
---|
Prefix | beanshell |
Description | Using environment variable to execute bean shell script. Passing parameter using URL query string syntax. |
Attributes | |
适用范围 | ScopeofUse | All components within the App.
|
示例 | 使用参数 “username” 和 “dept” 执行存储在“welcome”环境变量中的脚本: | Sample Attributes | To execute a script stored in "welcome" environment variable with parameter "username" and "dept": Code Block |
---|
| 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}]#
|