Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColorgreen
borderWidth1
titleBGColor#ddffcc
borderStylesolid
titleDefinition

ID Generator Field is used to produce a running number based on an Environment variable.  To learn more about its usage, refer to Generate Reference ID.

定义

生成ID字段 根据环境变量生成运行编号  。要了解有关其用法的更多信息,请参阅  生成参考ID

Note

如果您正在使用MySQL,则只需要执行此操作,因为其他数据库已经默认为“READ-COMMITTED”。

在MySQL中运行以下SQL。

Note

You will only need to do this if you are using MySQL, as other databases already default to "READ-COMMITTED".

Run following queries in MySQL.

SET GLOBAL tx_isolation='READ-COMMITTED';
SET SESSION tx_isolation='READ-COMMITTED';

 

You will also need to set the following in your 您还需要在my.cnf /my.ini file.ini文件中设置以下内容
[mysqld]
transaction-isolation = READ-COMMITTED


Figure 1: Screenshot highlighting ID Reference Field in sample HR Expenses Claim app

图1:突出显示示例HR费用声明应用程序中ID参考字段的屏幕截图

本文中的屏幕截图从 Screenshots in this article obtained from http://localhost:8080/jw/web/console/app/hr_expense/1/form/builder/hr_expense_new

Figure 2: ID Generator Field Properties

图2:ID生成器字段属性

名称描述
ID

元素ID(通过声明为“ref”,将创建相应的数据库表列“c_ref”)

NameDescription
ID

Element ID (By declaring as "ref", a corresponding database table column "c_ref" will be created)

Warning
titleNote when using this element when the form is part of a workflow process当表单是工作流程过程的一部分时,请注意使用此元素

当表单被用作工作流程的一部分时,不要将id设置为“id”。此元素生成的值不会与流程实例的ID关联。Do not set the id as "id" when the form is used as part of a workflow process. The value generated by this element will not be associated with process instance's ID.

LabelElement Label to be displayed to end user.元素标签显示给最终用户。
Environment Variable Name

Name of the environment variable to be used to keep the running number.用于保持运行时的环境变量的名称

Format

Determines the pattern of the generated value (e.g., "REF确定生成值的模式(例如,“REF - ?????" will yield "REF-00001")”将产生“REF-00001”)

Figure 3: ID Generator Field Properties - Advanced Options

图3:ID生成器字段属性 - 高级选项

名称描述NameDescription
Hidden?

Determines if the element should be made visible in the form.确定元素是否应该在表单中可见。

Workflow Variable

If the form is part of a workflow process, upon saving of the form (by clicking on "Save as Draft" or "Complete" button). The value in this input field will be saved into the corresponding workflow variable named here.如果表单是工作流程的一部分,则在保存表单时(单击“另存为草稿”或“完成”按钮)。此输入字段中的值将被保存到相应的工作流程变量中。

Info
titleUsing a non-existent Workflow Variable name使用不存在的工作流程变量名称

如果尝试映射到不存在的工作流程变量,则会在服务器日志中输出以下警告(例如状态)。You will get the following warning with the name printed out (e.g. status) in the server log if you attempt to map to a non-existent Workflow Variable.

Code Block
context attribute status does not exist in process context - adding new attributes to the process context is not allowed