UiPath Documentation
marketplace
latest
false

Marketplace 用户指南

上次更新日期 2026年4月1日

如何开始作业

作业是指使用一个或多个机器人执行流程。实施“开始作业”流程可创建新作业,以响应平台内(UiPath 平台外部)发生的事件。

文档图像

端点和输入

启动作业需要对多个 Orchestrator API 端点发出 GET 和 POST 请求。GET 请求用于检索对开始作业端点的 POST 请求所需的输入参数值。

What are the StartJob input parameters?

To successfully send POST requests to the StartJob endpoint, you must provide at a minimum, a ReleaseKey (process identifier) and Strategy (how to run the process) as input parameters. Depending on the Strategy, there may be additional input parameters including JobsCount or RobotIds.

How do I get the StartJob input parameter values?

To retrieve the required input parameters noted above (i.e., ReleaseKey and Strategy), you collect the following information:

流程名称

将在成功启动作业请求后运行的流程的名称(有关更多信息,请参阅《Orchestrator 指南》中的关于流程)。

The process name is used to retrieve the ReleaseKey value.

There may be multiple instances of the same process that are differentiated by the environment they're published in. Because of this, a single Process Name can result in multiple ReleaseKeys. In the event that there are multiple ReleaseKeys associated with a process, the EnvironmentName can be used to identify the ReleaseKey of the process the user wants to run (the EnvironmentName is also used to identify the available robots, more on that in the next bullet).

要同时检索给定流程的 发布密钥 环境名称 ,请使用 流程名称 作为输入参数(例如{{base url}}/odata/Releases?$filter=ProcessKey eq {{ProcessName}} )向 发布 端点发送 GET 请求。

备注:

版本GET 请求的响应还包含特定流程的输入参数要求。有关更多信息,请参阅下面的“输入参数”

策略

指定作业运行流程的方式;有以下三个选项:

1. 具体

流程在特定机器人上运行。

When Specific is selected, the StartJob endpoint requires the RobotId of the robot that you want to use to run the process.

要检索 机器人 ID ,请使用 环境名称 作为输入参数(例如{{base url}}/odata/Environments?$expand=Robots&$filter=Name eq {{_EnvironmentName_}} ),向 获取环境 端点发送 GET 请求。

Multiple RobotIds may be included in the GetEnvironments response. To identify the correct RobotId, you can use the Robot Name. Because of this, it's recommended that you collect this information when Specific is selected.

2. 作业计数

该流程使用下一个可用的机器人运行指定次数。

When JobsCount is selected, the StartJob endpoint requires the JobsCount input parameter to include a value. Because of this, it's recommended that you provide means for a user to enter a number.

3. 全部

该流程将在所有机器人上运行一次。

输入参数(可选)

The process, specified by the Process Name, may require input arguments. These input arguments typically map to data fields associated with an application object.

For example, an issue management system may have an Incident object. This Incident object includes several data fields that contain information relevant to the process (e.g., IncidentId, DateCreated, Owner, etc.).

如上所述,您可以通过解析 GET Releases响应(请参阅下面的示例响应)中的Arguments块来确定流程是否需要输入参数。

To include these data field values in the StartJob POST request, it's recommended that you provide the means to select the application object and its relevant data fields required for the process. When the job is invoked, the connector retrieves the data field values and adds them in the POST request as the InputArgument parameter value.

备注:

您还可以向Processes_GetArgumentsByKey端点发送 GET 请求,以确定流程是否具有必需参数。此端点的好处是响应仅包含参数详细信息(即InputOutput )。

此端点的缺点是,它将要求连接器发出额外的 GET 请求,以检索在上一个 GET Releases响应中已提供的信息(需要获取ReleaseKey值) 。

{
  "@odata.context": "https://platform.uipath.com/twTenantTest/twTenantTest/odata/$metadata#Releases",
  "@odata.count": 1,
  "value": [
    {
      "Key": "99587436-4ce5-480d-988c-6d7f43787a2c",
      "ProcessKey": "SupportTriage",
      "ProcessVersion": "1.0.1",
      "IsLatestVersion": false,
      "IsProcessDeleted": false,
      "Description": "",
      "Name": "SupportTriage_QuickstartDemo",
      "EnvironmentId": 128912,
      "EnvironmentName": "QuickstartDemo",
      "InputArguments": null,
      "ProcessType": "Process",
      "SupportsMultipleEntryPoints": false,
      "RequiresUserInteraction": true,
      "AutoUpdate": false,
      "JobPriority": "Normal",
      "Id": 312722,
      "Arguments": {
        "Input": "[{\)\)"name\)\)":\)\)"IncidentId\)\)",\)\)"type\)\)":\)\)"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\)\)",\)\)"required\)\)":true,\)\)"hasDefault\)\)":false}]",
        "Output": null
      },
      "ProcessSettings": null
    }
{
  "@odata.context": "https://platform.uipath.com/twTenantTest/twTenantTest/odata/$metadata#Releases",
  "@odata.count": 1,
  "value": [
    {
      "Key": "99587436-4ce5-480d-988c-6d7f43787a2c",
      "ProcessKey": "SupportTriage",
      "ProcessVersion": "1.0.1",
      "IsLatestVersion": false,
      "IsProcessDeleted": false,
      "Description": "",
      "Name": "SupportTriage_QuickstartDemo",
      "EnvironmentId": 128912,
      "EnvironmentName": "QuickstartDemo",
      "InputArguments": null,
      "ProcessType": "Process",
      "SupportsMultipleEntryPoints": false,
      "RequiresUserInteraction": true,
      "AutoUpdate": false,
      "JobPriority": "Normal",
      "Id": 312722,
      "Arguments": {
        "Input": "[{\)\)"name\)\)":\)\)"IncidentId\)\)",\)\)"type\)\)":\)\)"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\)\)",\)\)"required\)\)":true,\)\)"hasDefault\)\)":false}]",
        "Output": null
      },
      "ProcessSettings": null
    }

示例

本节提供指向示例连接器用户界面的链接,以及每个输入字段的相应 Orchestrator API 请求。

In these examples, we introduce the concept of a Template. A template represents an association of an application object and/or event with a UiPath process or queue. Conceptually, a template gives you the ability to invoke different Orchestrator resources (e.g., start a job, add a Queue item) when different events occur within your application (e.g., new object created, object status change) while maintaining a single authenticated connection.

文档图像

  • 端点和输入
  • What are the StartJob input parameters?
  • How do I get the StartJob input parameter values?
  • 示例

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新