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

工作流活动

上次更新日期 2026年3月26日

获取表单任务

UiPath.Persistence.Activities.FormTask.GetFormTasks

描述

帮助您查询按特定条件(即操作的 DTO 属性)筛选的单个操作或一组操作:

  • 状态
  • 标题
  • ID
  • 优先级
  • 任务目录名称
  • AssignedToUser
  • CreatorUser
  • LastModifierUser
  • 创建时间
  • LastModificationTime
  • OrganizationUnitID

“获取表单任务” 活动的 输出对象可用于任何其他暂留活动(例如“等待表单任务然后继续”) ,以涵盖需要另一个工作流等待操作的场景,该工作流与创建这些操作的工作流不同(例如,在当前作业失败时构建恢复工作流)。您还可以将输出对象作为输入传递给其他流程,这样就无需等待所有操作完成就可以在初始流程恢复之前完成。

备注:

根据操作的元数据,使用OData语法筛选和查询操作。

项目兼容性

Windows - 旧版 | Windows | 跨平台

Windows、Windows - 旧版配置

设计器面板
  • 任务目录名称- 使用创建表单任务活动设置的操作目录名称。
  • “引用” - 使用“创建表单任务”活动设置的操作引用。
  • Filter - The OData filter option, used to filter the retrieved actions by the specified criteria. This field supports only strings and String variables. For example, Status in ('Pending', 'Unassigned'), and Priority eq 'High'.
  • “选择” - OData select选项,用于检索操作属性的子集。需要输入 ID 选项。因此,如果要检索操作目录,则可使用"Id, TaskCatalogName"查询。此字段仅支持字符串和字符串变量。
  • Task Objects (Output) - The list of output objects that match the criteria set in the activity. The output is returned from Orchestrator as a List<FormTaskData> object. Use this object to create a recovery workflow or to pass it as input to a different process.
属性面板

常见

  • 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 秒)。

输入

  • 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.
  • “引用” - 使用“创建表单任务”活动设置的操作引用。
  • 任务目录名称- 使用创建表单任务活动设置的操作目录名称。

其他

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

OData 查询选项

OData 查询选项描述字段数据类型示例
展开OData expand 选项,用于显示条件的相关实体。字符串"AssignedUser"
筛选OData filter 选项,用于按指定条件筛选检索到的操作。字符串Status in ('Pending', 'Unassigned') and Priority eq 'High'
排序依据OData orderby选项,用于按指定条件升序 ( asc ) 或降序 ( desc ) 对检索到的操作进行排序。字符串"Title asc" "ID desc"
选择OData select 选项,用于检索操作属性的子集。字符串"ID, Status, TaskCatalogName"
跳过OData skip 选项,用于跳过检索多个操作。Int322
顶部OData top 选项用于设置要检索的记录数,每次限制为 1000 条记录。 如果留空,则检索前 100 条记录。Int3220
备注:

还支持“AND” / “OR”运算符。

输出

  • Task Objects (Output) - The list of output objects that match the criteria set in the activity. The output is returned from Orchestrator as a List<FormTaskData> object. Use this object to create a recovery workflow or to pass it as input to a different process.

跨平台配置

  • 任务目录名称- 使用创建表单任务活动设置的操作目录名称。
  • “引用” - 使用“创建表单任务”活动设置的操作引用。
  • Filter - The OData filter option, used to filter the retrieved actions by the specified criteria. This field supports only strings and String variables. For example, Status in ('Pending', 'Unassigned'), and Priority eq 'High'.
  • “选择” - OData select选项,用于检索操作属性的子集。需要输入 ID 选项。因此,如果要检索操作目录,则可使用"Id, TaskCatalogName"查询。此字段仅支持字符串和字符串变量。
  • Task Objects (Output) - The list of output objects that match the criteria set in the activity. The output is returned from Orchestrator as a List<FormTaskData> object. Use this object to create a recovery workflow or to pass it as input to a different process.
高级选项

常见

  • 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 秒)。

输入

  • 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.

OData 查询选项

OData 查询选项描述字段数据类型示例
展开OData expand 选项,用于显示条件的相关实体。字符串"AssignedUser"
排序依据OData orderby选项,用于按指定条件升序 ( asc ) 或降序 ( desc ) 对检索到的操作进行排序。字符串"Title asc" "ID desc"
跳过OData skip 选项,用于跳过检索多个操作。Int322
顶部OData top 选项用于设置要检索的记录数,每次限制为 1000 条记录。 如果留空,则检索前 100 条记录。Int3220

OData 查询示例

使用以下示例获取表单任务,或从其他查询中获取灵感:

  1. 获取高优先级且处于“待处理”状态的表单任务的 ID,并按标题名称降序排列。
    1. 筛选: "((Priority eq 'High') and (Status eq 'Pending'))"
    2. 排序依据: "Title desc"
    3. 选择"Id"
  2. 获取存储所有“ 未分配”和“ 中”优先级的表单任务的“ Actions 目录”,并按标题升序对这些任务进行排序。
    1. 筛选: "((Priority eq 'Medium') and (Status eq 'Unassigned'))"
    2. 排序依据: "Title asc"
    3. 选择"Id, TaskCatalogName"

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新