Insights
最新
False
横幅背景图像
Insights
上次更新日期 2024年4月18日

实时数据导出数据模型

概述

系统中的每项更改都由事件记录的 JSON 格式表示。

支持以下事件类型:

  • 描述作业的事件:

    • job.created
    • job.started
    • job.stopped
    • job.pending
    • job.completed
    • job.faulted
    • job.stopping
    • job.terminating
  • 描述队列项目的事件:

    • queueitem.added
    • queueItem.retried
    • queueItem.updated
    • queueItem.transactionAbandoned
    • queueItem.transactionCompleted
    • queueItem.transactionFailed
    • queueItem.transactionRetried
    • queueItem.transactionStarted
  • 描述计算机的事件:

    • machine.created
    • machine.updated
    • machine.deleted
    • machineSession.status
    • machine.assign
    • machine.unassign

由于不同的事件描述不同的实体和系统更改,因此它们具有不同的内容(JSON 字段)。

事件的格式和架构

每个事件都以 JSON 格式传递,并具有以下内容:

  • 特定于事件的正文
  • 常用字段
  • 元数据
为了更好地理解,请查看以下 job.created 事件示例。 为了便于阅读,该示例使用新行和注释来描述每个部分的格式。 真实事件不具有此格式,而是作为单行字符串传递。
{
    /*********************
            event-specific body
    **********************/
    "body": {
        "Job": {
            "Key": "<job-key>",
            "CreationTime": null,
            "State": "Pending",
            "StartTime": "<job-start-time>",
            "EndTime": null,
            "ProcessName": "<process-name>",
          "DisplayName": "<display-name>",
            "RobotName": "<robot-name>",
            "HostMachineName": "<host-machine-name>"
        },
    /*********************
            common fields
    **********************/
        "EventType": "job.started",
        "SchemaVersion": "0.0.1",
        "Timestamp": "<timestamp>",
        "TenantKey": "<tenant-key>",
        "TenantName": "<tenant-name>",
        "FolderName": "<folder-name>",
        "FullFolderPath": "<folder-path>",
        "FolderKey": "<folder-key>"
        },
    /*********************
            metadata
    **********************/
    "x-opt-sequence-number": <sequence-number>,
    "x-opt-offset": "<offset>",
    "x-opt-enqueued-time": <enqueued-time>,
    "Diagnostic-Id": "<diagnostic-id>"
}{
    /*********************
            event-specific body
    **********************/
    "body": {
        "Job": {
            "Key": "<job-key>",
            "CreationTime": null,
            "State": "Pending",
            "StartTime": "<job-start-time>",
            "EndTime": null,
            "ProcessName": "<process-name>",
          "DisplayName": "<display-name>",
            "RobotName": "<robot-name>",
            "HostMachineName": "<host-machine-name>"
        },
    /*********************
            common fields
    **********************/
        "EventType": "job.started",
        "SchemaVersion": "0.0.1",
        "Timestamp": "<timestamp>",
        "TenantKey": "<tenant-key>",
        "TenantName": "<tenant-name>",
        "FolderName": "<folder-name>",
        "FullFolderPath": "<folder-path>",
        "FolderKey": "<folder-key>"
        },
    /*********************
            metadata
    **********************/
    "x-opt-sequence-number": <sequence-number>,
    "x-opt-offset": "<offset>",
    "x-opt-enqueued-time": <enqueued-time>,
    "Diagnostic-Id": "<diagnostic-id>"
}

常用字段

每个事件中都会显示公共字段。

名称

类型

描述

事件类型

string

事件的类型。

SchemaVersion

string

架构的版本。 不同的版本可能支持不同的事件类型和字段。

时间戳

timestamp

事件的 UTC 时间戳。

TenantKey

Guid

生成事件的租户的唯一标识符。

租户名称

string

生成事件的租户的名称。

文件夹名称

string

生成事件的 Orchestrator 文件夹的名称。

FullFolderPath

string

如果文件夹是另一个文件夹的子文件夹,则此字段将显示完整路径。

FolderKey

Guid

文件夹的唯一标识符。

{
    "EventType": "queueItem.transactionCompleted",
    "SchemaVersion": "0.0.1",
    "Timestamp": "<timestamp>",
    "TenantKey": "<tenant-key>",
    "TenantName": "<tenant-name>",
    "FolderName": "<folder-name>",
    "FullFolderPath": "<folder-path>",
    "FolderKey": "<folder-key>"
}{
    "EventType": "queueItem.transactionCompleted",
    "SchemaVersion": "0.0.1",
    "Timestamp": "<timestamp>",
    "TenantKey": "<tenant-key>",
    "TenantName": "<tenant-name>",
    "FolderName": "<folder-name>",
    "FullFolderPath": "<folder-path>",
    "FolderKey": "<folder-key>"
}

作业事件

名称

类型

描述

密钥

Guid

作业的唯一标识符。

创建时间

timestamp

创建作业的时间戳。

开始时间

timestamp

开始作业的时间戳。

结束时间

timestamp

完成作业的时间戳。

状态

string

作业状态。 支持的值:

Pending
Running
Stopping
Terminating
Faulted
Successful
Stopped
Suspended
Resumed

流程名称

string

从中创建作业的包的名称。

显示名称

string

为 Orchestrator 中的流程提供的名称。

机器人名称

string

执行作业的机器人的名称。

主机名

string

正在执行作业的计算机。

{
    "body": {
        "Job": {
        "Key": "<job-key>",
        "CreationTime": "<creation-time>",
        "State": "Running",
        "StartTime": "<start-time>",
        "EndTime": null,
        "ProcessName": "<process-name>",
        "DisplayName": "<display-name>",
        "RobotName": "<robot-name>",
        "HostMachineName": "<host-machine-name>",
    },
    ... common fields ...
    "EventType": "job.started",
    ... more common fields ...
}{
    "body": {
        "Job": {
        "Key": "<job-key>",
        "CreationTime": "<creation-time>",
        "State": "Running",
        "StartTime": "<start-time>",
        "EndTime": null,
        "ProcessName": "<process-name>",
        "DisplayName": "<display-name>",
        "RobotName": "<robot-name>",
        "HostMachineName": "<host-machine-name>",
    },
    ... common fields ...
    "EventType": "job.started",
    ... more common fields ...
}

队列项目事件

名称

类型

描述

   

队列项目

JSON 对象

 
   

密钥

Guid

队列项目的唯一标识符。

队列定义 ID

number

队列项目所属队列的数字标识符。

状态

string

队列项目的状态。支持的值:

New
InProgress
Failed
Successful
Abandoned
Retried
Deleted
Unknown

审核状态

string

队列项目的审核状态。支持的值:

None
InReview
Verified
Retried
Unknown

截止日期

datetime

应处理项目的最晚日期和时间。

优先级

string

队列项目的优先级。支持的值:

High
Normal
Low
Unknown

创建时间

datetime

创建队列项目时的时间戳。

开始处理

datetime

队列项目开始处理时的时间戳。

结束处理

datetime

队列项目完成处理(成功与否)时的时间戳。

DefferDate

datetime

输入项目可进行处理的最早日期和时间。如果为空,则可以尽快处理该项目。

之前尝试中的秒数

number

上次失败的处理尝试持续的秒数。

重试次数

number

此队列项目的处理次数。

进度

string

开发者在 UiPath Studio 中添加的字符串字段,用于跟踪业务流程进度。

分析数据

string

一组键值对,其中包含开发者通过“ 设置事务状态” 活动在 Studio 中添加的 Analytics 属性中的数据。

输出

string

一组键值对,其中包含开发者通过“ 设置事务状态” 活动在 Studio 中添加的 Output 属性中的数据。

特定数据

string

一组键值对,其中包含开发者通过“ 设置事务状态” 活动在 Studio 中添加的 Specific Content 属性中的数据。

包含在“ 添加队列项目 ”活动中配置的自定义数据的键值对集合

UiPath Studio

创建者作业 ID

number

创建队列项目的作业的 ID。

执行者作业 ID

number

执行队列项目的作业的 ID。

ProcessExceptionReason

string

队列项目处理失败的原因摘要。

ProcessExceptionDetails

string

有关队列项目故障的其他详细信息。

ProcessExceptionType

string

对于完成时出现错误的队列项目,此字段描述错误(异常)的类型。 支持的值:

ApplicationException
BusinessException
None
   

队列

JSON 对象

 
   

密钥

Guid

队列的唯一标识符。

名称

string

队列名称。

描述

string

有关队列的其他信息,以便更好地识别它。

MaxNumberOfRetries

number

此队列中的项目在处理失败时可以重试的次数。

EnforceUniqueReference

boolean

说明每个队列项目的 Item Reference 字段是否应该是唯一的。

SlaInMinutes

number

表示队列 SLA 的整数值,以分钟为单位。

RiskSlaInMinutes

number

表示队列风险 SLA 的整数值(以分钟为单位)。

   
{
    "body": {
        "QueueItem": {
            "Key": "<queue-item-key>",
            "QueueDefinitionId": <queue-definition-id>,
          "Status": "New",
            "ReviewStatus": "None",
            "DueDate": "<due-date>",
            "Priority": "High",
            "CreationTime": "<creation-time>",
            "StartProcessing": "<start-processing-time>",
            "EndProcessing": null,
            "DefferDate": "<deffer-time>",
            "SecondsInPreviousAttempt": 0,
            "RetryNumber": 1,
            "Progress": "<progress>",
            "ProcessExceptionReason": null,
            "ProcessExceptionDetails": null,
            "ProcessExceptionType": null
        },
        "Queue": {
            "Key": "<queue-key>",
            "Name": "<queue-name>",
            "Description": "<queue-description>",
            "MaxNumberOfRetries": 1,
            "EnforceUniqueReference": false,
            "SlaInMinutes": 0,
            "RiskSlaInMinutes": 0
        },
    },
    ... common fields ...
}{
    "body": {
        "QueueItem": {
            "Key": "<queue-item-key>",
            "QueueDefinitionId": <queue-definition-id>,
          "Status": "New",
            "ReviewStatus": "None",
            "DueDate": "<due-date>",
            "Priority": "High",
            "CreationTime": "<creation-time>",
            "StartProcessing": "<start-processing-time>",
            "EndProcessing": null,
            "DefferDate": "<deffer-time>",
            "SecondsInPreviousAttempt": 0,
            "RetryNumber": 1,
            "Progress": "<progress>",
            "ProcessExceptionReason": null,
            "ProcessExceptionDetails": null,
            "ProcessExceptionType": null
        },
        "Queue": {
            "Key": "<queue-key>",
            "Name": "<queue-name>",
            "Description": "<queue-description>",
            "MaxNumberOfRetries": 1,
            "EnforceUniqueReference": false,
            "SlaInMinutes": 0,
            "RiskSlaInMinutes": 0
        },
    },
    ... common fields ...
}

计算机会话事件

名称

类型

描述

计算机键值

Guid

计算机的唯一标识符。

计算机名称

string

计算机的自定义名称。

主机名

string

映射到 UiPath 计算机的主机的名称。

服务用户名

string

正在运行计算机上的机器人服务的用户的名称。

计算机状态

string

计算机的状态。 支持的值:

Available
Busy
Disconnected
Unknown

时间戳

datetime

计算机会话事件的时间戳。

IsUnresponsive

boolean

检查计算机是否响应来自 Orchestrator 的连接。 支持的值:

true
false

计算机仍可用,但无响应。 如果十分钟内无响应,则表示已断开连接或未知。

{
    "body": {
        "MachineSession": {
            "MachineKey": "<machine-key>",
            "MachineName": "<machine-name>",
            "MachineId": <machine-id>,
            "HostMachineName": "<host-machine-name>",
            "ServiceUsername": "<service-username>",
            "MachineStatus": "Disconnected",
            "ReportingTime": "<reporting-time>",
            "IsUnresponsive": false
        },
        ... common fields ...
        "EventType":"machineSession.status",
        ... more common fields ...
}{
    "body": {
        "MachineSession": {
            "MachineKey": "<machine-key>",
            "MachineName": "<machine-name>",
            "MachineId": <machine-id>,
            "HostMachineName": "<host-machine-name>",
            "ServiceUsername": "<service-username>",
            "MachineStatus": "Disconnected",
            "ReportingTime": "<reporting-time>",
            "IsUnresponsive": false
        },
        ... common fields ...
        "EventType":"machineSession.status",
        ... more common fields ...
}

计算机事件

名称

类型

描述

AutomationCloudSlots

number

要在运行时保留的 Automation Cloud<b>TM</b> 插槽数。

HeadlessSlots

number

要在运行时保留的无头插槽数。

计算机 ID

number

计算机整数 ID,每个 Orchestrator 实例唯一。

计算机键值

Guid

计算机的唯一标识符。

计算机名称

string

计算机的自定义名称。

NonProductionSlots

number

要在运行时保留的 NonProduction 插槽数。

UnattendedSlots

number

要在运行时保留的 Unattended 插槽数。
{
    "body": {
        "Machine": {
            "MachineName": "<machine-name>",
            "MachineKey": "<machine-key>",
            "NonProductionSlots": 1,
            "HeadlessSlots": 0,
            "AutomationCloudSlots": 0,
            "UnattendedSlots": 0
        },
        ... common fields ...
}{
    "body": {
        "Machine": {
            "MachineName": "<machine-name>",
            "MachineKey": "<machine-key>",
            "NonProductionSlots": 1,
            "HeadlessSlots": 0,
            "AutomationCloudSlots": 0,
            "UnattendedSlots": 0
        },
        ... common fields ...
}

计算机分配事件

名称

类型

计算机键值

Guid

计算机的唯一标识符。

计算机名称

string

计算机的自定义名称。

{
    "body": {
        "MachineAssign": {
            "MachineKey": "<machine-key>",
            "MachineName": "<machine-name>"
        },
        "EventType": "machine.unassigned",
        ... common fields ...
    }
}{
    "body": {
        "MachineAssign": {
            "MachineKey": "<machine-key>",
            "MachineName": "<machine-name>"
        },
        "EventType": "machine.unassigned",
        ... common fields ...
    }
}

机器人日志

名称

类型

描述

文件名

string

正在执行的 .xaml 文件的名称。

初始化人员

string

执行的来源。 可能的值:

Assistant
Studio
StudioX
StudioPro
Orchestrator
CommandLine
RobotAPI

作业 ID

string/guid
JobKey,作业的唯一标识符。

级别

string

日志的日志记录级别。 可能的值:

Trace
Info
Warn
Error
Fatal

日志类型

string

机器人日志的类型。 可能的值:

User
Default
Error
Business
ExecutionStep
BusinessIteration
Info
Security
Technical

计算机 ID

number

计算机整数 ID,每个 Orchestrator 实例唯一。

计算机名称

string

计算机的自定义名称。

消息

string

机器人日志消息。可能的值:

execution started
execution ended

• 定义消息

流程名称

string

机器人正在执行的流程名称。

流程版本

string

流程的版本。

机器人名称

string

机器人的名称。

Windows 标识

string

执行了所记录操作的用户的名称。

处理异常的原因

string

异常的原因。 仅存在于事务结束日志中。

处理异常的类型

string

异常的类型。 仅存在于事务结束日志中。 可能的值:

ApplicationException
BusinessException

队列项目优先级

string

队列项目的优先级。仅存在于事务结束日志中。可能的值:

High
Normal
Low

队列项目审核状态

string

队列项目的审核状态。仅存在于事务结束日志中。可能的值:

InReview
Verified
Reported
Retried

队列名称

string

机器人从中执行队列项目的队列名称。

事务执行时间

number

事务的执行时间(以秒为单位)。 仅在处理队列项目时具有值。

交易 ID

string/Guid

事务的唯一键。 仅在处理队列项目时具有值。

交易说明

string

事务状态。 仅在处理队列项目时具有值。 可能的值:

Started
Ended
Postponed

交易状态

string

事务状态。仅在处理队列项目时具有值。可能的值:

ApplicationException
Start
SystemError
Failed
BusinessException
Success
InProgress

总执行时间(秒)

number

事务的执行时间,以秒为单位。 仅在处理队列项目时具有值。

activityInfo

JSON

包含 DisplayNameStateFaultedClosedExecuting)、 ActivityArguments的活动信息 JSON。

时间戳

datetime

生成事件的时间。

计算机键值

Guid

执行作业的计算机的唯一标识符。

自定义字段

JSON

一个 JSON,其中包含在 Studio 的“ 添加日志 字段”活动中定义的字段。

{
    "body": {
        "Level": "Info",
        "MachineKey": "<machine-key>",
        "RobotLog": {
            "message": "Transaction Ended",
            "level": "Information",
            "logType": "Default",
            "CustomFields": {
                "Custom fields 1": "value1",
                "Custom fields 2": 2,
            },
        "timeStamp": "<timestamp>",
        "fingerprint": "<fingerprint>",
        "windowsIdentity": "<windows-identity>",
        "machineName": "<machine-name>",
        "fileName": "<filename>",
        "transactionExecutionTime": 0.6733966,
        "queueItemPriority": "Normal",
        "processingExceptionReason": "",
        "transactionStatus": "Successful",
        "queueName": "<queue-name>",
        "transactionState": "Ended",
        "processingExceptionType": "",
        "transactionId": "<transaction-id>",
        "queueItemReviewStatus": "None",
        "processName": "<process-name>",
        "processVersion": "1.0.6",
        "jobId": "<job-id>",
        "robotName": "<robot-name>",
        "machineId": <machine-id>,
        "organizationUnitId": <organization-unit-id>
        },
        "EventType": "robotlog",
        ... common fields ...
    },
}{
    "body": {
        "Level": "Info",
        "MachineKey": "<machine-key>",
        "RobotLog": {
            "message": "Transaction Ended",
            "level": "Information",
            "logType": "Default",
            "CustomFields": {
                "Custom fields 1": "value1",
                "Custom fields 2": 2,
            },
        "timeStamp": "<timestamp>",
        "fingerprint": "<fingerprint>",
        "windowsIdentity": "<windows-identity>",
        "machineName": "<machine-name>",
        "fileName": "<filename>",
        "transactionExecutionTime": 0.6733966,
        "queueItemPriority": "Normal",
        "processingExceptionReason": "",
        "transactionStatus": "Successful",
        "queueName": "<queue-name>",
        "transactionState": "Ended",
        "processingExceptionType": "",
        "transactionId": "<transaction-id>",
        "queueItemReviewStatus": "None",
        "processName": "<process-name>",
        "processVersion": "1.0.6",
        "jobId": "<job-id>",
        "robotName": "<robot-name>",
        "machineId": <machine-id>,
        "organizationUnitId": <organization-unit-id>
        },
        "EventType": "robotlog",
        ... common fields ...
    },
}

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.