订阅

UiPath Orchestrator

UiPath Orchestrator 指南

关于作业

📘

在开始之前

Learn about runtime arguments, process types, and process compatibility.

作业表示在 UiPath 机器人上执行流程。 您可以在有人值守或无人值守模式下启动作业的执行。 除非出于调试或开发目的,否则您无法从 Orchestrator 在有人值守的机器人上启动作业。

可以从 UiPath Assistant 或机器人命令行界面触发有人值守作业。 无人值守作业从 Orchestrator 启动,可以直接从“作业流程” 页面启动,也可以通过“触发器” 页面上的触发器以预先计划的方式启动。

作业” 页面代表作业控制中心,您可以在其中监控已启动的作业,查看其详细信息和日志,以及停止/终止/恢复/重新启动作业。

The table below contains field descriptions for the Jobs page.

FieldDescription
ProcessThe name of the process.
[Remote debugging job] is displayed for jobs started from Studio through remote debugging sessions.
MachineThe machine object used for connecting the executing infrastructure to Orchestrator.
HostnameThe name of the workstation used for execution.
Host identityThe identity under which the execution takes place. The following values are possible:
<Domain\Username> - jobs executed under that specific account. Displayed in the following cases:
foreground jobs regardless of the Robot version;
all jobs executed on Robots lower than 2021.10;
attended jobs executed on robots connected using a machine key, without user sign-in.

Note: For Robots older than 2021.10, the host identity gets populated dynamically according to the account settings made in Orchestrator. Changing the domain\username for the account used to execute a job changes the host identity as well.

ROOT - background jobs executed on Linux robots.

NT AUTHORITY\LOCAL SERVICE - jobs executed under the Robot service identity. Displayed for background jobs executed on Robots 2021.10+ without credentials.
ⓘ Service mode robots run under NT AUTHORITY\LOCAL SERVICE. User mode robots run under a certain user identity.

N/A - jobs started from the Assistant by users connected using interactive sign-in. For robots connected using the machine key, without user sign-in, the <Domain\Username> is displayed.
Job typeThe type of job according to where the execution takes place and depending on whether the robot impersonates a user or not:
Service unattended - The execution happens on a server and the robot does not impersonate a user. Jobs are launched from Orchestrator
Personal remote - The execution happens on a server and the robot runs under the identity of a personal workspace owner. Jobs are launched from Orchestrator.
Attended - The execution happens on a user's personal machine. Jobs are launched from the Assistant.
Development - The execution happens on a server. Jobs are launched from Studio through remote debugging.
Runtime typeThe runtime type used for execution.
StateThe state of the job. See details about job states.
PriorityThe priority of the job. See details about job priorities.
StartedThe amount of time since the job has started executing. Hovering over this field displays the exact start time and date.
EndedThe amount of time since the job has finished executing. Hovering over this displays the exact end time and date.
SourceThe agent of the execution.
[trigger_name] - The job was started by that trigger.
Assistant - The job was started by the UiPath Assistant.
Manual - The job was started from Orchestrator.
Studio - The job was started for debugging purposes from Studio.
1616

文件夹

1615

个人工作区

帐户-计算机映射


启动作业或定义触发器时,您可以定义执行操作的特定帐户-计算机对。 帐户-计算机映射使您能够将特定帐户下的无人值守使用情况与特定计算机模板相关联。 可精细控制自动化的执行目标。 帐户-计算机映射可以基于租户(不绑定到特定文件夹),也可以基于文件夹(绑定到特定文件夹)。

Learn how to configure account-machine mappings.

执行目标


根据在 Orchestrator 中启动作业的机制,您可以隐式选择和配置作业分配策略和执行目标。本文介绍了从“作业”页面启动作业时可用的分配策略和执行目标。

了解触发器的执行目标

📘

作业执行依赖项

如果作业执行依赖于尚不可用的特定资源,则在满足作业执行条件之前,作业将保持“待处理”状态。
例如,用户 U1 使用凭据 C1 连接到主机名 H1。但是,输入了错误的凭据 C2 以连接到主机名。因此,作业进入待处理状态。如果稍后将凭据更新为正确的凭据(即 C1),则作业将继续执行。

📘

注意

If the Robot becomes unresponsive (the robot machine is down, or the Robot Service crashes) during job execution, after reconnecting, it restarts the execution of the jobs that were running during the crash.

1216

1. 动态分配

无需显式选择帐户和计算机的动态分配允许您在首先可用的帐户和计算机下多次执行前台流程。 只要您有足够的运行时,后台流程就可以在任何帐户上执行,无论其是否忙碌。

使用“动态分配”选项,您可以在一个作业中最多执行一个流程 10000 次。

2. 帐户

该流程在特定用户或机器人帐户下执行。如果未指定帐户,则 Orchestrator 会动态分配帐户。同时指定帐户和计算机意味着作业将在该特定帐户-计算机对上启动。

3. 计算机

此流程在附加到所选计算机模板的其中一台主机上执行。指定模型会显示一个附加的“主机名”选项,允许您从已连接的主机计算机池中选择特定主机。仅指定计算机会导致 Orchestrator 动态分配帐户。同时指定帐户和计算机意味着作业将在该特定帐户-计算机对上启动。

确保将与作业类型匹配的运行时分配给关联的计算机模型。仅显示与活动文件夹关联的已连接主机。

4. 计划作业执行结束

流程执行有时可能会出错,从而导致作业保持挂起状态。 该切换允许您通过指定在停止或终止作业之前可以经过的时间量来自动化停止作业的策略。 要处理无法停止的作业的情况,您可以选择终止作业。

5. 在作业恢复时保留帐户-计算机分配

默认情况下,该流程会在任何可用计算机上的任何可用机器人上恢复执行。 保持相同的帐户-计算机配置可确保优化资源使用和许可证要求。

 

❗️

动态分配使用约定

您需要为主机上相应计算机模型分配到的文件夹中的每个帐户配置 Windows 用户。
假设您使用计算机模型 FinanceT 生成的密钥将服务器连接到 Orchestrator。该计算机模型已分配到文件夹 FinanceExecution 和 FinanceHR,其中也分配了 6 个帐户。需要将这 6 个帐户设置为服务器上的 Windows 用户。

如果将作业配置为多次执行相同的流程,则会为每次执行创建一个作业条目。根据作业的优先级和创建时间对作业进行排序,优先级较高、较早的作业排在第一位。机器人可用后,它将立即执行下一个作业。在此之前,作业仍处于挂起状态。

示例

设置

  • 1 个文件夹
  • 1 个带有两个运行时的计算机模型
  • 2 个帐户:john.smith 和 petri.ota
  • 2 个需要用户交互的流程:P1 - 将队列项目添加到队列,P2 - 处理队列中的项目
    计算机模型和帐户必须与包含流程的文件夹相关联。

预期结果

  • 任何人都以高优先级执行 P1。
  • P2 由 petri.ota 以低优先级执行。

所需的作业配置

  • 使用 P1 启动作业,不将其分配给任何特定帐户,将优先级设置为“”。
  • 启动 P2 的作业,将其分配给 petri.ota,将优先级设置为“低”

 

执行优先级


在部署流程或为该流程配置作/触发器时,您可以通过“作业优先级”字段控制哪个作业优先于其他竞争作业。作业的优先级分为以下十种:

256

手动启动作业

“作业优先级”字段的默认值为“继承”,这意味着优先级继承自最初的配置位置。您可以保持原样,也可以进行更改。
Automations Page > Jobs
作业继承在流程级别设置的优先级。
Automations Page > Triggers
如果触发器的优先级为“继承”,则作业将继承在流程级别设置的优先级。
如果触发器的优先级不同于继承,则作业将继承在触发器级别设置的优先级。如果将其更改为“继承”,则使用在流程级别设置的优先级。
Automations Page > Processes
作业继承为该流程设置的优先级。

如果将作业配置为多次执行相同的流程,则会为每次执行创建一个作业条目。根据作业的优先级和创建时间对作业进行排序,优先级较高、较早的作业排在第一位。机器人可用后,它将立即执行下一个作业。在此之前,作业仍处于挂起状态。

通过触发器启动作业

默认情况下,优先级设置为“已继承”,这意味着它将继承流程级别的值。选择流程会自动更新箭头图标,以说明在流程级别设置的值。触发器启动的所有作业的优先级都设置在触发器级别。如果保留默认的“已继承”,则将以在流程级别设置的优先级启动作业。
在流程级别进行的任何后续更改都将传播到触发器以及通过该触发器隐式创建的作业。

使用 API 设置作业优先级

界面中可用的 10 个优先级对应于 API 中的 100 个级别,这意味着 API 允许您设置更精细的优先级。这些级别映射如下:

MinimumMaximumDefault
Lowest1105
Very low112015
Low213025
Medium-low314035
Medium415045
Medium-high516055
High617065
Very high718075
Highest819085
Critical9110095

要设置或更改作业的优先级,请使用 SpecificPriorityValue 参数,这些参数支持用于以下端点:

  • POST​/odata​/Jobs​/UiPath.Server.Configuration.OData.StartJobs
  • POST/odata​/ProcessSchedules
  • PUT/odata​/ProcessSchedules({key})

假设您有两个作业,并将其优先级分别设为 92 和 94。这二者的优先级都在“严重”范围内,但优先级为 94 的作业将在优先级为 92 的作业之前执行。

📘

注意

如果您启动的作业需要用户干预同一台未在 Windows Server 上运行的计算机上的多个机器人,则所选流程仅由第一个机器人执行,而其余流程将失败。将为每个执行创建一个实例,并将其显示在“作业”页面上。

高密度机器人作业


如果您从同一台 Windows Server 计算机上的多个高密度机器人上启动作业,则意味着所选流程由每个指定的机器人同时执行。将为每个执行创建一个实例,并将其显示在“作业”页面上。

If you are using High-Density Robots and did not enable RDP on that machine, each time you start a job, the following error is displayed: “A specified logon session does not exist. It may already have been terminated.” To see how to set up your machine for High-Density Robots, please see the About Setting Up Windows Server for High-Density Robots page.

录制


For unattended faulted jobs, if your process had the Enable Recording option switched on, you can download the corresponding execution media to check the last moments of the execution before failure.
仅当您对执行介质具有“查看”权限时,“下载录制”选项才会显示在“作业”窗口中。

Updated 8 days ago


关于作业


建议的编辑仅限用于 API 参考页面

您只能建议对 Markdown 正文内容进行编辑,而不能建议对 API 规范进行编辑。