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

工作流活动

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

分配任务

UiPath.Persistence.Activities.Tasks.AssignTasks

描述

使用在 Orchestrator 中注册的电子邮件地址或用户名,将当前工作流中的一个或多个任务分配给 Orchestrator 中的用户。

项目兼容性

Windows - 旧版 | Windows | 跨平台

先决条件

  • 仅当组或组的所有成员至少都具有“操作”时,组分配才有效:分配给 Orchestrator 中的相应文件夹的“查看”“编辑”权限。仅当组满足以下条件时,您才能为组中的用户分配操作:
    • 遍历组中的所有用户:该组可以是本地组(本地组),也可以是 Azure Active Directory (AD) 组。AD 组中的嵌套成员也将分配到任务。
    • 对于基于工作负载或基于轮询的分配:仅支持本地组。
备注:

基于工作负载和基于轮询的分配将仅考虑给定本地组的前 1000 个成员进行分配。

Windows - 旧版,Windows 配置

设计器面板
  • “分配条件” - 用于将操作分配给:

    • 单个用户(仅适用于 StudioX 策略):将任务分配给特定用户。
    • 组中的所有用户:将同一任务分配给组中的每个用户。用户完成任务后,系统会自动将其从所有其他用户的“待处理”选项卡中删除,并移至“已完成”选项卡中。
    • “基于工作负载”:将任务分配给待处理任务最少的组成员,不包括分配给组中 “所有用户”的任务。
    • 轮询:以轮换(轮询)顺序将任务分配给每个组成员。仅考虑使用此方法分配的任务。有关更多详细信息,请参阅组分配操作
  • 单个任务分配

    • 任务 ID - 任务的 ID。
    • 用户名或电子邮件- 要将此任务分配给的用户的用户名或电子邮件地址。
    • 用户 ID - 要向其分配任务的用户的 ID。要检索用户 ID,…
    • Task Assignment Type - The type of the assignment operation to be performed. By default, the Assign operation is set, and it can be changed to Reassign if you want to assign the same action to a different user.
    • TaskUserAssignments - A list of task identifiers and corresponding user information to which an action is to be assigned/reassigned, stored in a List<TaskUserAssignment> object. This field supports List<TaskUserAssignment> objects only. The object must contain a task identifier and its corresponding user information, such as an email address or a username that is registered in Orchestrator.
    • FailedTaskAssignments - If any of the user assignment requests fail, a list is created, containing the task identifier, error message, and error code, as well as the email address or username that is registered in Orchestrator, in a List<TaskAssignmentResponse> object in this property field. This field supports List<TaskAssignmentResponse> objects only.
  • 多任务分配

    选择“启用多重分配” 。设计器面板中提供以下属性:

    • 任务用户分配(输入) - 要向其分配/重新分配操作的任务标识符和相应用户信息的列表,存储在List<TaskUserAssignment>对象中。此字段仅支持List<TaskUserAssignment>对象。该对象必须包含任务标识符及其相应的用户信息,例如在 Orchestrator 中注册的电子邮件地址或用户名。
    • Task Assignment Type - The type of the assignment operation to be performed. By default, the Assign operation is set, and it can be changed to Reassign if you want to assign the same action to a different user.
    • FailedTaskAssignments - If any of the user assignment requests fail, a list is created, containing the task identifier, error message, and error code, as well as the email address or username that is registered in Orchestrator, in a List<TaskAssignmentResponse> object in this property field. This field supports List<TaskAssignmentResponse> objects only.
  • 启用多重分配- 启用分配多个任务的选项。

  • 任务 ID - 任务的 ID。

  • 用户名或电子邮件- 要将此任务分配给的用户的用户名或电子邮件地址。

  • Task Assignment Type - The type of the assignment operation to be performed. By default, the Assign operation is set, and it can be changed to Reassign if you want to assign the same action to a different user.

  • FailedTaskAssignments - If any of the user assignment requests fail, a list is created, containing the task identifier, error message, and error code, as well as the email address or username that is registered in Orchestrator, in a List<TaskAssignmentResponse> object in this property field. This field supports List<TaskAssignmentResponse> objects only.

属性面板

输入

  • “Orchestrator 文件夹路径” - 要用于此活动的 Orchestrator 文件夹的路径。如果留空,则使用当前的 Orchestrator 文件夹。此字段仅支持字符串和String变量。

其他

  • “出错时继续”- 指定在活动引发错误时是否应继续自动化操作。该字段仅支持“布尔值”(True 和 False)。

    默认值为 False。因此,如果该字段为空且活动引发错误,系统将停止执行项目。如果该值设为“True”,则无论出现何种错误,系统都将继续执行项目。

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

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

跨平台配置

设计器面板
  • “分配条件” - 用于将操作分配给:

    • 单个用户(仅适用于 StudioX 策略):将任务分配给特定用户。
    • 组中的所有用户:将同一任务分配给组中的每个用户。用户完成任务后,系统会自动将其从所有其他用户的“待处理”选项卡中删除,并移至“已完成”选项卡中。
    • “基于工作负载”:将任务分配给待处理任务最少的组成员,不包括分配给组中 “所有用户”的任务。
    • 基于轮询: 按轮换(轮询)顺序将任务分配给每个组成员。仅考虑使用此方法分配的任务。有关更多详细信息,请参阅组分配操作
  • 单个任务分配

    • 任务 ID - 任务的 ID。
    • 用户名或电子邮件- 要将此任务分配给的用户的用户名或电子邮件地址。
    • 用户 ID - 要向其分配任务的用户的 ID。要检索用户 ID,请使用GET /odata/Users Orchestrator API。
    • Task Assignment Type - The type of the assignment operation to be performed. By default, the Assign operation is set, and it can be changed to Reassign if you want to assign the same action to a different user.
    • TaskUserAssignments - A list of task identifiers and corresponding user information to which an action is to be assigned/reassigned, stored in a List<TaskUserAssignment> object. This field supports List<TaskUserAssignment> objects only. The object must contain a task identifier and its corresponding user information, such as an email address or a username that is registered in Orchestrator.
    • FailedTaskAssignments - If any of the user assignment requests fail, a list is created, containing the task identifier, error message, and error code, as well as the email address or username that is registered in Orchestrator, in a List<TaskAssignmentResponse> object in this property field. This field supports List<TaskAssignmentResponse> objects only.
  • 多任务分配

    选择“启用多重分配” 。设计器面板中提供以下属性:

    • 任务用户分配(输入) - 要向其分配/重新分配操作的任务标识符和相应用户信息的列表,存储在List<TaskUserAssignment>对象中。此字段仅支持List<TaskUserAssignment>对象。该对象必须包含任务标识符及其相应的用户信息,例如在 Orchestrator 中注册的电子邮件地址或用户名。
    • Task Assignment Type - The type of the assignment operation to be performed. By default, the Assign operation is set, and it can be changed to Reassign if you want to assign the same action to a different user.
    • FailedTaskAssignments - If any of the user assignment requests fail, a list is created, containing the task identifier, error message, and error code, as well as the email address or username that is registered in Orchestrator, in a List<TaskAssignmentResponse> object in this property field. This field supports List<TaskAssignmentResponse> objects only.
  • 启用多重分配- 启用分配多个任务的选项。

  • 任务 ID - 任务的 ID。

  • 用户名或电子邮件- 要将此任务分配给的用户的用户名或电子邮件地址。

  • Task Assignment Type - The type of the assignment operation to be performed. By default, the Assign operation is set, and it can be changed to Reassign if you want to assign the same action to a different user.

  • FailedTaskAssignments - If any of the user assignment requests fail, a list is created, containing the task identifier, error message, and error code, as well as the email address or username that is registered in Orchestrator, in a List<TaskAssignmentResponse> object in this property field. This field supports List<TaskAssignmentResponse> objects only.

属性面板

输入

  • “Orchestrator 文件夹路径” - 要用于此活动的 Orchestrator 文件夹的路径。如果留空,则使用当前的 Orchestrator 文件夹。此字段仅支持字符串和String变量。

其他

  • “出错时继续”- 指定在活动引发错误时是否应继续自动化操作。该字段仅支持“布尔值”(True 和 False)。

    默认值为 False。因此,如果该字段为空且活动引发错误,系统将停止执行项目。如果该值设为“True”,则无论出现何种错误,系统都将继续执行项目。

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

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

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新