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

工作流活动

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

创建外部任务

UiPath.Persistence.Activities.ExternalTask.CreateExternalTask

描述

使用给定的数据、任务标题、任务优先级和任务目录创建外部操作。

项目兼容性

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 strings and String variables only.
  • TaskData - A collection of business data, in the form Dictionary<String,Argument>, that you want to store in a given action. Modifying Out and In/Out arguments maps them back to the workflow after the action is completed. This field supports Dictionary<String,Argument> objects only.
  • “任务对象(输出)” - 创建操作后从 Orchestrator 作为ExternalTaskData对象返回的任务对象。可以将此对象传递给“等待外部任务然后继续”活动,以便在操作完成之前暂停工作流的执行。
属性面板

常见

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

输入

  • External Tag - A tag that can be used to identify the external system which is the source for the data in the given action. This field supports strings and String variables only.

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

    备注:

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

  • Orchestrator 文件夹路径- 当前流程不在其中运行的Orchestrator 文件夹的路径(要在其中创建任务)。要了解有关 Orchestrator 文件夹的更多信息,请转到此处。对于传统文件夹,此属性只能用于浮动机器人,并且仅在当前用户在目标文件夹中具有正确的任务权限时才可用。对于新式文件夹,不支持文件夹路径覆盖。此字段仅支持字符串和String变量。

    备注:

    当必须从当前文件夹以外的文件夹创建或查询任务时,才必须使用“文件夹路径”属性。如果执行此操作的用户没有目标文件夹所需的权限,则创建任务将失败并引发严重错误。您可以在此处查看有关文件夹权限的更多信息。

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

    备注:

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

  • TaskData - A collection of business data, in the form Dictionary<String,Argument>, that you want to store in a given action. Modifying Out and In/Out arguments maps them back to the workflow after the action is completed. This field supports Dictionary<String,Argument> objects 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.

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

其他

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

输出

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

跨平台配置

  • 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 strings and String variables only.

    备注:

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

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

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

高级选项

常见

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

输入

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

    备注:

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

  • Orchestrator 文件夹路径- 当前流程不在其中运行的Orchestrator 文件夹的路径(要在其中创建任务)。要了解有关 Orchestrator 文件夹的更多信息,请转到此处。对于传统文件夹,此属性只能用于浮动机器人,并且仅在当前用户在目标文件夹中具有正确的任务权限时才可用。对于新式文件夹,不支持文件夹路径覆盖。此字段仅支持字符串和String变量。

    备注:

    当必须从当前文件夹以外的文件夹创建或查询任务时,才必须使用“文件夹路径”属性。如果执行此操作的用户没有目标文件夹所需的权限,则创建任务将失败并引发严重错误。您可以在此处查看有关文件夹权限的更多信息。

  • Reference - A tag that you can use to identify the external system which is the source for the data in the given action. This field supports strings and String variables only.

创建外部操作

要创建外部操作,请在以下过程中选择:

  1. Add a Create External Task activity into your workflow and provide information for the following property fields:
    • 任务标题
    • 任务优先级
    • 任务数据 (集合)
    • External Tag - Specify a tag to uniquely identify batches of external tasks that you want to retrieve from a third-party system. You can use this tag to sync External Tasks with an external system. Also, you can use this tag to complete tasks based on the actions a user takes in the third party system.
  2. 使用 API创建外部操作

将外部操作与第三方工具同步

要将外部操作与其他外部系统同步,您需要首先在外部系统内为其创建相应的对象,然后使用 API 调用检索第三方系统创建的任务或任务批次。

  1. 在外部系统内创建对象,例如:
  2. Call the following API in Swagger: GET /odata/Tasks/UiPath.Server.Configuration.OData.GetTasksAcrossFolders.

For example: GET <ORCH_URL>/odata/Tasks/UiPath.Server.Configuration.OData.GetTasksAcrossFolders?$filter=(Type eq 'ExternalTask') and (IsDeleted eq false) and (ExternalTag eq 'JiraTasks') and (Status ne 'Completed')&$count=true.

检索外部操作

Call the following API to retrieve information about an external task, using the Task Id and the Organization Unit Id (the Id of the Orchestrator folder): GET /tasks/GenericTasks/GetTaskDataById. You can use the retrieved details to create a similar task in a third-party system.

下面的屏幕截图显示了 Swagger 中的 API 参数和响应。要在 Swagger 中访问租户,请按照“访问 Swagger 文件”过程进行操作。

docs image

docs image

完成外部操作

Call the following API to complete an external task, using the Task Id and the Organization Unit Id (the Id of the Orchestrator folder): POST /tasks/GenericTasks/CompleteTask.

有关更多详细信息,请访问 Orchestrator API 指南中的“完成外部任务”过程。

docs image

工作流示例

如需获取示例或供日后参考,请查看示例项目

此页面有帮助吗?

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