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

Process Mining

上次更新日期 2025年4月2日

自动化数据

您可以将 Process Mining 应用程序中的数据与 UiPath Platform 中运行的自动化中的数据连接起来。 这为您提供了通过 UiPath 监控的流程的端到端视图。

将自动化数据连接到流程数据时,您可以更详细地了解端到端流程。这样可以更深入地了解流程中发生的“人机回圈”操作。此外,它使您能够更好地了解自动化步骤和手动步骤之间以及系统步骤之间的延迟,并跟踪特定目标。

Process Mining 项目和自动化数据中都存在的对象信息(对象类型对象 ID )用于将自动化数据连接到您的流程数据。

例如,您可以使用对象类型销售订单对象 ID SalesOrderID 作为连接 ID,将“采购到付款”流程的 Coupa 系统数据与用于发票处理流程(“采购到付款”流程的子流程)的自动化数据联接跨数据源。

先决条件

假设您拥有利用流程跟踪服务的自动化数据,并且具有一个或多个与自动化中的任务相关联的业务对象。 有关更多信息,请参阅流程跟踪

添加自动化数据

请按照以下步骤将自动化数据添加到输入数据中。

  1. 选择“添加数据” 图标“添加数据” 图标 在“数据转换” 编辑器的“输入数据” 部分中的“自动化数据” 旁边,

    “选择自动化业务流程”窗口将打开,显示可用的流程自动化。

    备注:

    您也可以从“管理自动化数据”窗口中选择“添加数据” ,以打开“选择自动化业务流程”窗口。

  2. 选择要连接到Process Mining应用程序数据的一个或多个流程。

  3. 选择“配置”。

自动化数据已上传,并将以下表格添加到“输入数据” 部分的“自动化数据” 列表中:

  1. Automation_events

  2. Queue_items

  3. Action_center_tasks

  4. Automation_due_dates

删除自动化数据

请按照以下步骤删除自动化数据。

  1. 转到“选择自动化业务流程”窗口。

  2. 取消选择您不想再为其加载自动化数据的一个或多个流程。

  3. 选择“配置”。

管理自动化数据

选择“设置”图标设置图标以打开“管理自动化数据”窗口。

从自动化中排除表格

默认情况下,自动化的输入数据中包含Automation_eventsQueue_itemsAction_center_tasksAutomation_due_dates表。

您可以选择要从输入中排除的表格。

设置自动化数据的日期范围

如果要为自动化设置有限或特定的时间范围,则可以指定定义该时间范围的开始日期和结束日期。 指定的时间范围适用于输入数据中的所有表格。

备注:

如果追踪在所选结束日期之后继续(或结束),则这仍可能包括时间范围之外的数据。这是因为时间范围限制适用于追踪的开始时间,而不是持续时间或结束时间。因此,在所选结束日期之后追踪生成的任何数据仍将包含在结果中。

刷新数据

为流程应用程序加载数据时,自动化数据会自动刷新。

您也可以从“管理自动化数据”窗口中刷新数据。请执行以下步骤。

  1. 选择“刷新数据” 。系统会显示确认消息。

  2. 选择“重新加载”以重新加载所有可用的自动化数据。

“自动化事件”表格

Automation_events表存储自动化事件和相关的业务对象。
下表描述了Automation_events表的字段。

字段

类型

描述

Trace_ID

text

追踪的唯一标识符。

Process

text流程的名称。 由用户在连接自动化数据时选择。 可以选择一个或多个追踪。

Event_ID

text

事件的唯一标识符。
Parent_event_ID

text

父事件的Event_ID

Task

text自动化事件的名称。

Object_ID

text与自动化事件相关的业务对象标识符。 这由用户在自动化工作流中显式设置。
Object_type

text

业务对象类型。 例如,销售订单、发票或客户。
Object_interactiontext与事件相关的对象的信息。 例如,创建交互或批准。
Object_propertiestext一个 JSON 值,存储与对象相关的所有属性 (键值对)
Automation_nametext

记录自动化事件的作业的作业属性。如果是“等待作业”事件,则这是正在等待的作业的属性。

Automation_type

text

机器人将执行的任务类型。
Job_sourcetext指示作业的启动位置。
Job_infotext作业的简短说明。

Automation_version

text

自动化的版本。
Host_machine_nametext执行作业的计算机或服务器的名称。
Robot_name

text

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

text

负责执行作业的机器人类型。 例如,“有人值守”、“无人值守”或“非生产”。

Job_ID

text自动化事件标识符。当多个对象与事件相关时,一个事件可能会多次发生。
Queue_item_ID

text

队列项目与自动化事件相关时,队列项目的标识符。
Action_center_task_ID

text

任务与自动化事件相关时的任务标识符。
Event_start时间戳自动化事件开始的时间戳。 此选项始终可用。
Event_end时间戳自动化事件结束的时间戳。这仅在事件完成时可用。

“Queue_items”表格

Queue_items表存储与自动化事件相关的队列项目。
下表描述了Queue_items表的字段。

字段

类型

描述

Queue_item_ID

text

用于将队列项目链接到自动化事件的标识符。

Queue_name

text

队列项目所属的队列名称。

Defer_date

timestamp

队列项目可进行处理的日期和时间。

Due_date

timestamp

队列项目应完成的日期和时间。

Creation_timestamp

timestamp

队列项目添加到队列中的日期和时间。

Start_processing

timestamp

开始处理队列项目的日期和时间。

End_processing

timestamp

队列项目完成的日期和时间。

Processing_time

duration/integer

Start_processingEnd_processing之间的毫秒数。

Processing_exception_reason

text

指示无法成功完成或处理队列项目的原因。

Progress

text

队列项目的进度指示。

Reference

text

队列项目的唯一标识符。

Retry_number

integer

如果队列项目最初失败,则系统将再次尝试队列项目的次数。

Reviewer

text

负责验证队列项目是否已成功完成的用户。

Review_status

text

审核指示的队列项目的状态。

Robot_name

text

处理队列项目的机器人的名称。

Priority

text

队列中项目的优先级。

Processing status

text

正在处理时的队列项目状态。

Processing_exception_type

text

指示处理项目时是否发生错误。

Robot_type

text

负责处理队列项目的机器人的类型。 例如,“有人值守”、“无人值守”或“非生产”。

Is_open

boolean

从处理状态派生的属性。 当处理状态为“新”或“正在进行”时,队列项目视为打开。

“操作中心任务”表

Action_center_tasks表存储来自 Action Center 的与自动化事件相关的任务。
下表描述了Action_center_tasks表的字段。

字段

类型

描述

Action_center_task_ID

text

用于将任务链接到自动化事件的标识符。

Title

text

任务的说明。

Catalog

text

完成工作流需要执行的任务列表。

Assignee

text

负责完成任务的用户或系统。

Action

text

完成该任务所需执行的活动或活动集。

Priority

text

工作流中任务的优先级。
Status

text

工作流中任务的实际状态。
Type

text

任务的分类。

Creation_timestamp

timestamp

任务的创建日期和时间。

Last_assigned_timestamp

timestamp

上次分配任务的日期和时间。

Completion_timestamp

timestamp

完成任务的日期和时间。

Is_completedboolean指示任务是否已完成。

Assigning_time

integer

基于创建时间戳和上次分配时间戳之间的差异的派生字段。

Completion_time

integer

基于创建时间戳和完成时间戳之间的差异派生字段。

Number_of_users

integer

基于参与查看任务事件的用户数量的派生字段。

Automation_ Due_dates 表

Automation_due_dates表存储队列项目和任务的到期日期。
下表描述了Automation_due_dates表的字段。

字段

类型

描述

Queue_item_ID

text

仅包含到期日期与队列项目相关的值。

Action_center_task_ID

text

仅包含截止日期与任务相关时的值。

Due_date

text

到期日期的名称: <queue name><task type>任务分配或<task type>任务完成。
Due_date_statustext根据预期完成时间确定的任务状态指示。
Action_on_overduetext任务逾期时要执行的操作。 仅在与任务相关的到期日期可用。
Actual_timestamp时间戳队列项目或任务完成的日期和时间。

Expected_timestamp

timestamp

队列项目或任务应完成的日期和时间。

On_time

boolean

指示是否在到期日期。

Time_difference

integer

实际时间与预期时间之间的差异。

在转换中使用自动化数据

要在转换中使用自动化数据,请首先将表格添加到sources.yml文件中。然后,您可以像引用任何其他输入表一样,在dbt项目中引用这些源表。

将表格添加到sources.yml

您可以使用以下代码将表添加到sources.yml文件中。
 sources:
  - name: sources
    schema: "{{ var('schema_sources', target.schema) }}"
    # Enabled quoting for databases, schemas, and identifiers where the sources are located.
    quoting:
      database: true
      schema: true
      identifier: true
    tables:
      - name: Automation_events
      - name: Queue_items
      - name: Action_center_tasks
      - name: Automation_due_datessources:
  - name: sources
    schema: "{{ var('schema_sources', target.schema) }}"
    # Enabled quoting for databases, schemas, and identifiers where the sources are located.
    quoting:
      database: true
      schema: true
      identifier: true
    tables:
      - name: Automation_events
      - name: Queue_items
      - name: Action_center_tasks
      - name: Automation_due_dates

在 dbt 项目中引用源表

您可以使用以下代码来引用 dbt 项目中的表。

 with Automation_events as (
    select * from {{ source('sources', 'Automation_events') }}
),

Queue_items as (
    select * from {{ source('sources', 'Queue_items') }}
),

Action_center_tasks as (
    select * from {{ source('sources', 'Action_center_tasks') }}
),

Automation_due_dates as (
    select * from {{ source('sources', 'Automation_due_dates') }}
),with Automation_events as (
    select * from {{ source('sources', 'Automation_events') }}
),

Queue_items as (
    select * from {{ source('sources', 'Queue_items') }}
),

Action_center_tasks as (
    select * from {{ source('sources', 'Action_center_tasks') }}
),

Automation_due_dates as (
    select * from {{ source('sources', 'Automation_due_dates') }}
),

用例

场景 1. 将自动化中的事件添加到事件日志

如果Process Mining转换涵盖多个业务对象,则可以将自动化中的事件添加到事件日志中。 在此场景中,您只需将自动化数据连接到流程应用程序,以更深入地了解流程的特定部分。

备注:
示例演示了如何将自动化连接到Sales order对象。 您可以通过根据需要调整相关引用来使用其他对象。

请按照以下步骤将自动化添加到事件日志。

  1. 添加新的 SQL 文件Sales_order_automation_events
  2. 复制以下 SQL 示例,在其中执行以下操作:

    1. 根据销售订单对象类型筛选Automation_events
    2. Object_ID重命名为Sales_order_ID ,以标识这是一个销售订单事件。
    3. 使用Task中存储的值作为Activity
    4. 至少包含必填字段Event_end
       with Automation_events as (
          select * from {{ source('sources', 'Automation_events') }}
      ),
      
      Sales_order_automation_events as (
          select
              Automation_events."Object_ID" as "Sales_order_ID",
              Automation_events."Task" as "Activity",
              Automation_events."Event_end",
              Automation_events."Event_ID",
              'null' as "Parent_event_ID"
          from Automation_events
          where Automation_events."Object_type" = 'Sales order'
      )
      
      select * from Sales_order_automation_eventswith Automation_events as (
          select * from {{ source('sources', 'Automation_events') }}
      ),
      
      Sales_order_automation_events as (
          select
              Automation_events."Object_ID" as "Sales_order_ID",
              Automation_events."Task" as "Activity",
              Automation_events."Event_end",
              Automation_events."Event_ID",
              'null' as "Parent_event_ID"
          from Automation_events
          where Automation_events."Object_type" = 'Sales order'
      )
      
      select * from Sales_order_automation_events
  3. Sales_order_automation_events与 Process Mining 项目中定义的其他事件合并。
    备注:

    使用“自定义”“事件日志”应用程序模板时,您的“Process Mining”项目仅跟踪一个感兴趣对象。 您可以直接将对象上的自动化事件与事件日志合并。

    • 确保对合并的事件生成唯一的Event_ID ,以确保事件日志中的事件标识符唯一。

  4. 验证您在Process Mining项目中定义的对象 ID 是否与自动化事件中的对象 ID 匹配。 相应地更新转换,以便将两个数据源中的事件连接到正确的对象。

场景 2:从自动化中获取其他对象信息

在这种情况下,您可以从自动化数据中提取对象属性信息,以使用它来丰富流程应用程序中的仪表板。

Object_properties字段存储在自动化中添加的业务对象的属性。此字段中的值是具有键值对的 JSON 格式。
例如:{"Claim_number": 216, "Client": "Alex Smith"}
使用 pm-utils json()函数提取各个属性。
以下 SQL 代码示例说明了如何使用 pm-utils json()函数提取Claim_numberClient属性。
 select
    Automation_events."Object_ID",
    {{ pm_utils.json('Automation_events."Object_properties"', 'Claim_number') }} as "Claim_number",
    {{ pm_utils.json('Automation_events."Object_properties"', 'Client') }} as "Client",
from Automation_eventsselect
    Automation_events."Object_ID",
    {{ pm_utils.json('Automation_events."Object_properties"', 'Claim_number') }} as "Claim_number",
    {{ pm_utils.json('Automation_events."Object_properties"', 'Client') }} as "Client",
from Automation_events

场景 3:使用队列项目数据丰富自动化事件

自动化事件可以与队列项目相关联。 自动化事件表示队列项目的执行。 队列项目的相关信息存储在单独的表格Queue_items中。 使用此表格在Queue_item_ID上联接自动化事件,以获取以下信息:
  • 执行的优先级。
  • 异常。
  • 到期日期。
以下 SQL 代码示例说明了如何使用队列项目属性PriorityProcessing_exception_type丰富自动化事件。
 select
    Automation_events."Event_ID",
    Automation_events."Object_ID",
    Queue_items."Priority",
    Queue_items."Processing_exception_type"
from Automation_events
left join Queue_items
    on Automation_events."Queue_item_ID" = Queue_items."Queue_item_ID"select
    Automation_events."Event_ID",
    Automation_events."Object_ID",
    Queue_items."Priority",
    Queue_items."Processing_exception_type"
from Automation_events
left join Queue_items
    on Automation_events."Queue_item_ID" = Queue_items."Queue_item_ID"
到期日期信息存储在Automation_due_dates表中。 一个队列项目至多有一个到期日期。 以下 SQL 代码显示了如何获取可用的到期日期信息。
 select
    Automation_events."Event_ID",
    Automation_events."Object_ID",
    Queue_items."Due_date",
    Queue_items."Expected_timestamp",
    Queue_items."Actual_timestamp"
from Automation_events
left join Automation_due_dates
    on Automation_events."Queue_item_ID" = Automation_due_dates."Queue_item_ID"select
    Automation_events."Event_ID",
    Automation_events."Object_ID",
    Queue_items."Due_date",
    Queue_items."Expected_timestamp",
    Queue_items."Actual_timestamp"
from Automation_events
left join Automation_due_dates
    on Automation_events."Queue_item_ID" = Automation_due_dates."Queue_item_ID"

场景 4:使用任务数据丰富自动化事件

自动化事件可以与任务相关联。 自动化事件表示自动化流程中需要人工参与的步骤。 有关任务的信息存储在单独的表格Tasks中。 使用此表格在Task_ID上联接自动化事件,以获取以下信息:
  • 任务的受分配人。
  • 任务的优先级
  • 截止日期(任务 SLA)
以下 SQL 代码示例显示了如何使用任务属性AssigneePriority丰富自动化事件。
 select
    Automation_events."Event_ID",
    Automation_events."Object_ID",
    Action_center_tasks."Assignee",
    Action_center_tasks."Priority"
from Automation_events
left join Action_center_tasks
    on Automation_events."Event_ID" = Action_center_tasks."Action_center_tasks_ID"select
    Automation_events."Event_ID",
    Automation_events."Object_ID",
    Action_center_tasks."Assignee",
    Action_center_tasks."Priority"
from Automation_events
left join Action_center_tasks
    on Automation_events."Event_ID" = Action_center_tasks."Action_center_tasks_ID"
到期日期信息存储在Automation_due_dates表中。 一个任务可以与多个截止日期相关。您可以将截止日期应用于应分配任务和完成任务时。
备注:
Action_center_task_ID上将Automation_eventsAction_center_tasks不进行任何筛选地联接可能会导致重复。

以下 SQL 代码示例说明了如何通过仅考虑任务完成截止日期来用任务截止日期信息丰富自动化事件。

 with Task_completion_due_dates as (
    select * from Automation_due_dates
    where pm_utils.charindex('task completion', '"Due_date"') > 0
)

select
    Automation_events."Action_center_tasks_ID",
    Automation_events."Object_ID",
    Action_center_tasks."Due_date",
    Action_center_tasks."Expected_timestamp",
    Action_center_tasks."Actual_timestamp"
from Automation_events
left join Task_completion_due_dates 
    on Automation_events."Task_ID" = Task_completion_due_dates."Task_ID"with Task_completion_due_dates as (
    select * from Automation_due_dates
    where pm_utils.charindex('task completion', '"Due_date"') > 0
)

select
    Automation_events."Action_center_tasks_ID",
    Automation_events."Object_ID",
    Action_center_tasks."Due_date",
    Action_center_tasks."Expected_timestamp",
    Action_center_tasks."Actual_timestamp"
from Automation_events
left join Task_completion_due_dates 
    on Automation_events."Task_ID" = Task_completion_due_dates."Task_ID"

此页面有帮助吗?

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