activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

工作流活动

上次更新日期 2026年2月19日

创建表单任务

UiPath.Persistence.Activities.FormTask.CreateFormTask

描述

在 Action Center 的云实例和内部部署实例中创建表单操作。 它还会在 On-Premises Orchestrator 版本 21.4 及更低版本中创建表单任务。

先决条件
  • 安装 UiPath.FormActivityLibrary 包 2.0.7 或更高版本,以启用表单设计器。
  • 表单任务的大小上限为 1MB。 为满足此 1MB 的限制,您需要仅使用存储桶将图像嵌入表单中。 此外,我们建议仅对小于 2KB 的徽标和图标使用base64类型的图像。

项目兼容性

Windows - 旧版 | Windows | 跨平台

Windows、Windows - 旧版配置

设计器面板
  • TaskTitle - The title of the action you want to create. This field supports strings and String variables only.
  • TaskPriority - Enables you to select the priority level of the action. By default, this property is set to TaskPriority.Medium The following options are available: TaskPriority.Low, TaskPriority.Medium, TaskPriority.High, TaskPriority.Critical.
  • TaskCatalog - An optional business classification of task items. This field supports only strings and String variables.
    重要提示:

    在创建操作之前,请确保操作目录存在。否则,操作创建将失败,并显示以下错误消息:“不存在名称为 [action_catalog_name] 的任务目录,错误代码:2451”。

  • FormData - A collection of business data in the form Dictionary<String,Argument> that you want to display in a form within the Actions inbox. Modifying Out and In/Out arguments maps them back to the workflow after the task is completed. This field supports Dictionary<String,Argument> objects only.
  • “任务对象(输出)” - 创建操作后从 Orchestrator 作为FormTaskData对象返回的任务对象。可以将此对象传递给“等待表单任务然后继续”活动,以便在操作完成之前暂停工作流的执行。
    备注:

    任务对象有几个属性,用于保存有关输出操作对象的信息。例如, TaskUrl属性为您在 Orchestrator 内部部署版中的“操作”选项卡中提供了操作的 URL,而ActionUrl属性在 Automation Cloud 中为您提供了“操作”选项卡中操作的 URL。要从内部部署 Action Center 访问操作,请将/actions_/tasks/taskID添加到 Action Center 基本 URL,例如: https://laptop-name:port-number/actions_/tasks/taskID

单击“打开表单设计器”按钮将打开“表单设计器”向导,该向导使您能够自定义要在工作流中使用的表单。

选择“启用批量编辑” 属性后, “打开批量表单设计器”按钮将变为可用。此选项将打开“批量表单设计器”,允许您设计表单操作,这些操作可在相应 Action Center 实例的“操作”选项卡中批量编辑或完成。

属性面板

常见

  • ContinueOnError - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.

    备注:

    如果“Try Catch 异常处理”中包含该活动且“出错时继续”属性的值为“True”,则系统在执行项目时不会捕获任何错误。

  • “显示名称”- 活动的显示名称。

  • “超时(毫秒)”- 指定最长等待时间(以毫秒为单位),如果超出该时间后活动并未运行,系统便会抛出错误。默认值为 30000 毫秒(30 秒)。

输入

  • 启用高级表单- 启用用于表单呈现和逻辑的增强功能和自定义选项,例如:

    • 用于“编辑网格”的可自定义模板。
    • 充当事件 的按钮。
    • 能够使用 ES6 和新式 JavaScript 自定义表单。
    • 用于自定义表单的instanceoptions变量的可用性。
  • “启用批量编辑” - 如果选中,则活动主体中的“打开批量表单设计器” 按钮将变为可用。此选项允许您生成表单操作,并可以在 Action Center 的“操作” 选项卡中批量编辑或完成这些表单操作

    docs image

  • FormData - A collection of business data in the form Dictionary<String,Argument> that you want to display in a form within the Actions inbox. Modifying Out and In/Out arguments maps them back to the workflow after the task is completed. This field supports Dictionary<String,Argument> objects only.

  • GenerateInputFields - If selected, all the entries from the Form Data Collection are generated as components in the Form Designer. Leaving it empty does not add additional form fields to the designer.

  • 标签- 机器人将输入的标签添加到操作中,以便于将来进行筛选。此字段仅支持字符串值,并且有命名限制

    备注:

    To allow automatic actions labeling through Persistence activities, the robot account executing the workflow needs View, Create, and Delete permissions on Tags.

  • Orchestrator Folder Path - The path to the Orchestrator Folder you want to use with this activity. If left empty, the current Orchestrator folder is used. This field supports only strings and String variables.

    备注:

    如果执行此操作的用户没有目标文件夹所需的权限,则创建任务将失败并引发严重错误。查看有关文件夹权限的更多信息。

  • Reference - The name used as reference for future filtering of the actions. This field supports string values only.

  • TaskCatalog - An optional business classification of task items. This field supports only strings and String variables.

    重要提示:

    在创建操作之前,请确保操作目录存在。否则,操作创建将失败,并显示以下错误消息:“不存在名称为 [action_catalog_name] 的任务目录,错误代码:2451”。

  • TaskPriority - Enables you to select the priority level of the action. By default, this property is set to TaskPriority.Medium The following options are available: TaskPriority.Low, TaskPriority.Medium, TaskPriority.High, TaskPriority.Critical.

  • TaskTitle - The title of the action you want to create. This field supports strings and String variables only.

  • Use Local Form File - enables the creation of Form Actions using a JSON form file, specified at execution. This field supports Boolean values only. When you enable it, the Form File Path property field appears in the body of the activity, where you specify the path to the JSON file, where a certain form layout is stored.

After you select Use Local Form File, click Open Form Designer, select New, and start building a form. When you finish , select Save As, and save it inside the corresponding project folder. Now you have the form that you previously created stored inside a JSON file. Input the path to this JSON file inside the Form File Path field to use that form at runtime.

其他

  • “私有”- 选中后将不再以“Verbose”级别记录变量和参数的值。

输出

  • “任务对象(输出)” - 创建操作后从 Orchestrator 作为FormTaskData对象返回的任务对象。可以将此对象传递给“等待表单任务然后继续”活动,以便在操作完成之前暂停工作流的执行。

存储

  • Storage Bucket Name - The storage bucket you want to use for large data files referenced in the form data.
  • Storage Folder Path - The full path to the folder in the specified storage bucket. This field supports strings and String variables only.
    提示:

    结合使用图像嵌入与存储桶时,必须与“上传存储文件”活动结合使用。必须在参数名称的“表单数据收集”属性中添加后缀,并通过在HTML 元素组件中使用下划线 ( _ ) 将其映射到表单中的图像。参数名称 ( &lt;key&gt;_storage ) 必须映射到上传存储文件活动的目标属性中的存储值。请注意,图像文件名不得包含加号 ( + ),因为存储桶上传流程会掩盖此字符,从而导致错误。

跨平台配置

  • TaskTitle - The title of the action you want to create. This field supports strings and String variables only.
  • TaskPriority - Enables you to select the priority level of the action. By default, this property is set to TaskPriority.Medium The following options are available: TaskPriority.Low, TaskPriority.Medium, TaskPriority.High, TaskPriority.Critical.
  • TaskCatalog - An optional business classification of task items. This field supports only strings and String variables.
    重要提示:

    在创建操作之前,请确保操作目录存在。否则,操作创建将失败,并显示以下错误消息:“不存在名称为 [action_catalog_name] 的任务目录,错误代码:2451”。

  • FormData - A collection of business data in the form Dictionary<String,Argument> that you want to display in a form within the Actions inbox. Modifying Out and In/Out arguments maps them back to the workflow after the task is completed. This field supports Dictionary<String,Argument> objects only.
  • “任务对象(输出)” - 创建操作后从 Orchestrator 作为FormTaskData对象返回的任务对象。可以将此对象传递给“等待表单任务然后继续”活动,以便在操作完成之前暂停工作流的执行。
    备注:

    任务对象有几个属性,用于保存有关输出操作对象的信息。例如, TaskUrl属性为您在 Orchestrator 内部部署版中的“操作”选项卡中提供了操作的 URL,而ActionUrl属性在 Automation Cloud 中为您提供了“操作”选项卡中操作的 URL。要从内部部署 Action Center 访问操作,请将/actions_/tasks/taskID添加到 Action Center 基本 URL,例如: https://laptop-name:port-number/actions_/tasks/taskID

单击“打开表单设计器”按钮将打开“表单设计器”向导,该向导使您能够自定义要在工作流中使用的表单。

选择“启用批量编辑” 属性后, “打开批量表单设计器”按钮将变为可用。此选项将打开“批量表单设计器”,允许您设计表单操作,这些操作可在相应 Action Center 实例的“操作”选项卡中批量编辑或完成。

高级选项

常见

  • ContinueOnError - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.

    备注:

    如果“Try Catch 异常处理”中包含该活动且“出错时继续”属性的值为“True”,则系统在执行项目时不会捕获任何错误。

  • “超时(毫秒)”- 指定最长等待时间(以毫秒为单位),如果超出该时间后活动并未运行,系统便会抛出错误。默认值为 30000 毫秒(30 秒)。

输入

  • 启用高级表单- 启用用于表单呈现和逻辑的增强功能和自定义选项,例如:

    • 用于“编辑网格”的可自定义模板。
    • 充当事件 的按钮。
    • 能够使用 ES6 和新式 JavaScript 自定义表单。
    • 用于自定义表单的instanceoptions变量的可用性。
  • “启用批量编辑” - 如果选中,则活动主体中的“打开批量表单设计器” 按钮将变为可用。此选项允许您生成表单操作,并可以在 Action Center 的“操作” 选项卡中批量编辑或完成这些表单操作

    docs image

  • Use Local Form File - enables the creation of Form Actions using a JSON form file, specified at execution. This field supports Boolean values only. When you enable it, the Form File Path property field appears in the body of the activity, where you specify the path to the JSON file, where a certain form layout is stored.

  • GenerateInputFields - If selected, all the entries from the Form Data Collection are generated as components in the Form Designer. Leaving it empty does not add form fields to the designer.

  • 标签- 机器人将输入的标签添加到操作中,以便于将来进行筛选。此字段仅支持字符串值,并且有命名限制

    备注:

    To allow automatic actions labeling through Persistence activities, the robot account executing the workflow needs View, Create, and Delete permissions on Tags.

  • Orchestrator Folder Path - The path to the Orchestrator Folder you want to use with this activity. If left empty, the current Orchestrator folder is used. This field supports only strings and String variables.

    备注:

    如果执行此操作的用户没有目标文件夹所需的权限,则创建任务将失败并引发严重错误。查看有关文件夹权限的更多信息。

  • Reference - The name used as reference for future filtering of the actions. This field supports string values only.

  • Form File Path - input the relative path to the form JSON file that you saved inside the current project.

存储

  • Storage Bucket Name - The storage bucket you want to use for large data files referenced in the form data.
  • Storage Folder Path - The full path to the folder in the specified storage bucket. This field supports strings and String variables only.

已知问题

将新列添加到网格组件时,表单设计器可能不会自动更新。要解决此问题,您可以使用以下解决方法:

  1. 打开表单设计器。
  2. 编辑表单中的任何组件,然后保存更改。
  3. 保存整个表单。
  4. 重新打开表单,撤消之前所做的更改,然后再次保存。 现在,表单应重置,并且新列应该可见。

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2026 UiPath。保留所有权利。