- 概述
- 文档处理合同
- 发行说明
- 关于文档处理合同
- Box 类
- IPersistedActivity 接口
- PrettyBoxConverter 类
- IClassifierActivity 接口
- IClassifierCapabilitiesProvider 接口
- 分类器文档类型类
- 分类器结果类
- 分类器代码活动类
- 分类器原生活动类
- 分类器异步代码活动类
- 分类器文档类型功能类
- ContentValidationData Class
- EvaluatedBusinessRulesForFieldValue Class
- EvaluatedBusinessRuleDetails Class
- 提取程序异步代码活动类
- 提取程序代码活动类
- 提取程序文档类型类
- 提取程序文档类型功能类
- 提取程序字段功能类
- 提取程序原生活动类
- 提取程序结果类
- FieldValue Class
- FieldValueResult Class
- ICapabilitiesProvider 接口
- IExtractorActivity 接口
- 提取程序有效负载类
- 文档操作优先级枚举
- 文档操作数据类
- 文档操作状态枚举
- 文档操作类型枚举
- 文档分类操作数据类
- 文档验证操作数据类
- 用户数据类
- 文档类
- 文档拆分结果类
- DomExtensions 类
- 页类
- 页面分区类
- 多边形类
- 多边形转换器类
- 元数据类
- 词组类
- 词类
- 处理源枚举
- 结果表格单元类
- 结果表值类
- 结果表列信息类
- 结果表类
- 旋转枚举
- Rule Class
- RuleResult Class
- RuleSet Class
- RuleSetResult Class
- 分区类型枚举
- 词组类型枚举
- IDocumentTextProjection 接口
- 分类结果类
- 提取结果类
- 结果文档类
- 结果文档范围类
- 结果数据点类
- 结果值类
- 结果内容引用类
- 结果值令牌类
- 结果派生字段类
- 结果数据源枚举
- 结果常量类
- 简单字段值类
- 表字段值类
- 文档组类
- 文档分类类
- 文档类型类
- 字段类
- 字段类型枚举
- FieldValueDetails Class
- 语言信息类
- 元数据输入类
- 文本类型枚举
- 类型字段类
- ITrackingActivity 接口
- ITrainableActivity 接口
- ITrainableClassifierActivity 接口
- ITrainableExtractorActivity 接口
- 可训练的分类器异步代码活动类
- 可训练的分类器代码活动类
- 可训练的分类器原生活动类
- 可训练的提取程序异步代码活动类
- 可训练的提取程序代码活动类
- 可训练的提取程序原生活动类
- 基本数据点类 - 预览
- 提取结果处理程序类 - 预览
- Document Understanding ML
- Document Understanding OCR 本地服务器
- Document Understanding
- 智能 OCR
- 发行说明
- 关于“智能 OCR”活动包
- 项目兼容性
- 加载分类
- 将文档数字化
- 分类文档作用域
- 基于关键词的分类器
- Document Understanding 项目分类器
- 智能关键词分类器
- 创建文档分类操作
- 创建文档验证工件
- 检索文档验证工件
- 等待文档分类操作然后继续
- 训练分类器范围
- 基于关键词的分类训练器
- 智能关键词分类训练器
- 数据提取作用域
- Document Understanding 项目提取程序
- Document Understanding 项目提取程序训练器
- 基于正则表达式的提取程序
- 表单提取程序
- 智能表单提取程序
- 文档脱敏
- 创建文档验证操作
- 等待文档验证操作然后继续
- 训练提取程序范围
- 导出提取结果
- 机器学习提取程序
- 机器学习提取程序训练器
- 机器学习分类器
- 机器学习分类训练器
- 生成分类器
- 生成式提取程序
- 配置身份验证
- ML 服务
- OCR
- OCR 合同
- OmniPage
- PDF
- [未公开] Abbyy
- [未列出] Abbyy 嵌入式

Document Understanding 活动
使用应用程序操作验证文档
This quickstart guide helps you start validating documents by adding the Validation Station within UiPath® Action apps, and then sending them out for validation through Action Center as App actions. The tutorial uses UiPath Studio to automate the document processing, UiPath Apps to for displaying the validation station, and Action Center for performing the validation. The document type that is used in the examples throughout this tutorial is a health insurance form, of type CMS 1500 claim form.
本快速入门指南的概述步骤如下:
- 构建显示验证控件的操作应用程序。
- 使用先前配置的应用程序来设计处理文档的 Studio 自动化,并将其发送以在 Action Center 中进行验证。
- 在 Action Center 中完成操作。
步骤
1. 构建 Actions 应用程序
先决条件
确保您的租户:
- 拥有足够的 Robot Units,因为应用程序使用 Serverless Robot 运行。
- A Serverless robot template is created in Orchestrator and provisioned. For more information on serverless robots and adding them to a tenant, visit Executing unattended automations with Serverless robots.
1. 创建 Actions 应用程序
Unlike VB apps available via the Apps service, apps can be accessed through Studio Web.
要创建 Actions 应用程序,请按照以下步骤操作:
- 转到 Studio Web。
- Select Create New > App to create a new project.
- Within the Project Explorer of your app, select Add pages, workflows, controls, integrations > Action. This step adds an Action to your app, and lets you configure an action schema for it.
- Expand Action, and select ActionSchema. Configure the action schema with the In and Out arguments that you want for App actions in Action Center.
- For Outcomes, add other custom outcomes that you want the action to have. For example, you can add the a custom outcome, named "Approve".
- For Input Properties, add properties for data that you want to pass into the action. These properties will appear in the Create App Task activity, when this app is selected from the Apps dropdown list. Input properties allow you to pass data from your Studio automation to your action.
- For Output Properties, add properties for arguments that you want to retrieve from the action. These properties will be accessible from the Wait for App Task and Resume activity, through the Task Object (Output) variable.
- For Input/Output properties, add properties that function as In/Out arguments in your Studio automation. These Input/Output properties first appear as properties in the Create App Task activity, that you pass to the action. And then, after the action is completed, you can access the same properties, that were updated, from the Wait for App Task and Resume activity, through the Task Object (Output) property.
2. 添加并自定义验证控件
验证控件包含在文档处理工作流中使用的验证站点。要在操作应用程序中添加并自定义验证控件,请按照以下步骤操作:
-
打开要包含验证站点的所需操作应用程序。
-
Select Open toolbox.
-
Under Display, find the Validation Control, and add it into your app.
Adding the Validation Control to your app automatically creates a
Var<ValidationControl_PageName>variable under the App variables section from your app's Project Explorer.备注:You can use the Validation Control and the corresponding App Variable to read information from the Validation Control. Use the
Var<ValidationControl_PageName>App Variable to write information to it. -
准备操作架构:
-
In the Project Explorer, under Action, select ActionSchema.
-
In the Input Properties, select Add property.
-
In the property search bar, select More Options.
-
Under Advanced, select ContentValidationData.
This is the input property that will display in the Create App Task activity. The ContentValidationData input property requires a
ContentValidationDataobject as input, which can be a single object or an array/list ofContentValidationDatainstances.ContentValidationDatacontains the artifacts of the Validation Station.ContentValidationDatais created using the Create Document Validation Artifacts activity.
-
-
配置验证控件:
- 转到“验证控件”属性。
- In the Source input, select the Action input that you have defined as a
ContentValidationDatatype.
-
使用您需要的其他控件配置应用程序的其余部分。
3. 访问验证控件数据及其属性
Various properties of the Validation Control, such as Taxonomy, Extraction Result, Selected Document Type, Selected Field, and Data Source, can be accessed using the Validation Control variable (VarValidationControl_PageName). You can change the values displayed in the Validation Control through the corresponding app variable. Follow the steps outlined under Edit Validation Control data to add, modify, or remove a field value.
下表描述了可以从“验证控件”访问的属性、其数据类型和说明。
Table 1. Validation Control properties
| 属性 | 数据类型 | 描述 |
|---|---|---|
Taxonomy | UiPath.DocumentProcessing.Contracts.Taxonomy.DocumentTaxonomy | 准备显示内容的分类对象。其中包含有关文档类型、字段和显示属性的信息。 |
ExtractionResult | UiPath.DocumentProcessing.Contracts.Results.ExtractionResult | 来自验证控件的原样提取结果 (无论是否存在人为更改)。 |
SelectedDocumentType | System.String | 验证控件中当前选择的文档类型的名称。 |
SelectedField | UiPath.DocumentProcessing.Contracts.Apps.FieldValueDetails | 验证控件中当前选择的字段及其值。 |
DataSource | UiPath.DocumentProcessing.Contracts.Actions.ContentValidationData | 当前作为验证控件来源的内容验证数据。 |
Hidden | boolean | 管理控件是可见还是隐藏的控件属性状态。 |
Disabled | boolan | 管理控件是否可编辑的控件属性状态。 |
IsValid | boolean | 检查“验证控制”值的有效性。如果为 true,则表示它有效。 |
4. 编辑验证控件数据
您可以通过相应的应用程序变量更改“验证控件”中显示的值。例如,您可以通过相应的应用程序变量更改在“验证控件”中显示的“提取结果”值。
以下示例显示了如何更新常规字段值:
- Select any Control in your app, and go to Events.
- Select Define automation. This action opens Studio Web's designer panel, where you can build a trigger automation for a certain app control.
- In the context of the document's Extraction Results, to add or change a field value for regular fields, add a Set Variable Value activity in the automation.
-
For the To Variable field, use
AppVariable.VarValidationControl_PageName.Field("<field name>").Value.该表达式表示您要更改的字段,可通过
VarValidationControl_PageName变量访问。 -
In the To field enter the desired value for the referenced field.
除常规字段外,
AppVariable.VarValidationControl_PageName变量还可使用AppVariable.VarValidationControl_PageName.Field("<field name>", <index>)操作多值字段,并使用AppVariable.VarValidationControl_PageName.Field("<table field name").Field("<column name>", <row index>)与表格单元格交互。To delete values, select the target value similarly and use the
.DeleteValueflag set to True. The properties of values that you can update in the validation control include:
- 文本值 (
.Value) - 已确认的状态 (
.Confirmed) - 值的置信度 (
.Confidence) - 删除标志 (
.DeleteValue) - 标记以删除值引用 (
.KeepReference)
-
You can use the same steps for changing other Validation Control data at runtime. The only difference is that you use a different variable, in the To Variable field, so it corresponds to the Validation Control data you want to change. For example, you can use AppVariable.ValidationControl.SelectedDocumentType variable if you want to update it with a different value.
Figure 1. The Set Variable Value activities through which you can update data from the Validation Control

5. 为验证控件创建事件
You can trigger various events specific to the Validation Control. In the Project Explorer, navigate to the Validation Control, and select it. The Events panel of the Validation Control allows you to define automations for specific events.
下表描述了可用的验证控件事件:
Table 2. Validation Control events
| 事件 | 描述 |
|---|---|
| 就绪 | 加载验证控件时触发。 |
| 文档类型已更改 | 当用户更改验证控件的文档类型时触发。 |
| 选定的字段 | 当用户在验证控件中选择一个字段或一个字段值时触发。 |
| 字段值已更改 | 当用户在验证控件中添加、删除或替换字段值时触发。 |
6. 使用专用的验证控件活动
You can use specific activities dedicated to working with the Validation Control, from the AppEvents.Activities package:
- Set Validation Control Field Focus: Allows you to focus on a field, based on a configured event.
- Save Validation Control State: Saves the state of the Validation Control. You can use this when you want to revisit and complete the validation later.
常用验证控件表达式
在创建包含验证控件的应用程序时,可以使用以下表达式来访问该验证控件公开的各种数据。下表描述了使用“验证控件”时可以使用的最常用表达式:
| 用途 | 表达式 |
|---|---|
| 访问验证控件中显示的提取结果 |
|
| 访问“验证控件”中加载的分类 |
|
| 访问“验证控件”中的选定字段 |
|
| 访问其他验证控件属性 | MainPage.ValidationControl.<PropertyName> |
| 读取提取结果数据 | Use the methods exposed by the Extraction Result class . |
| 读取分类数据 | Use the methods exposed by the Taxonomy class . |
| 访问字段值以在验证控件中更新该值 | AppVariable.<ValidationControlVariable>.Field("<FieldName>").Value |
| 检索“验证控件”中显示的字段名称列表 | AppVariable.<ValidationControlVariable>.ExtractionResult.GetFields().Select(Function(f) f.FieldName) |
6. 发布并部署应用程序
After you build your Action app and trigger automations for Controls inside of it, you can publish it. Publishing the app makes it available to use for creating App actions. For more information on publishing apps, visit Publishing, deploying, and upgrading app projects.
2. 创建 Studio 自动化
先决条件
- 安装以下活动包版本:
- IntelligentOCR.Activities 版本 6.24.0
- Persistence.Activities 版本 1.5.5 或更高版本。
- AppEvents.Activities 版本 3.12.0 或更高版本。
- Create a storage bucket in Orchestrator, in the same folder where you want to publish the document processing automation. Data required to load the Validation Control within apps is stored within an Orchestrator storage bucket.
- 在 Studio 项目文件夹中添加要处理的文档。
- (可选)如果要使用生成式提取或验证功能,则需要特定的服务单元
- If you enrolled in the Flex plan, you need AI unitsFor more information on Document Understanding generative features, visit Generative features.
1. 使用 Document Understanding 处理文件
添加使用 Document Understanding 处理文件的活动。使用数字化和提取,通过应用程序准备要在 Action Center 中进行验证的文档。
添加用于处理文件的活动后,以下变量应可用:
DocumentTaxonomy(Taxonomy): Retrieved via the Load Taxonomy activity.Dom(Document Object Model) andtext(Document Text): Acquired through the Digitize Document activity.doc(文档路径):表示已处理文件的路径。autoExtractionResults(ExtractionResults): This is the output from the Data Extraction Scope activity, regardless of the extraction methods used.
2. 将验证信息发送到应用程序
文档准备好进行验证后,您可以准备要发送给先前创建和部署的应用程序的所有信息。请执行以下步骤:
- Add a Create Document Validation Artifacts activity to create the
Content Validation Dataobject which stores the information necessary for loading the Validation Control within the Action app. In this example, configure the activity using the previously created or outputted variables:- Bucket Folder Path: The name of the Orchestrator folder where the storage bucket was created.
- Bucket Name:
storageBucketName - Bucket Directory Path: The directory path within the previously inputted storage bucket, where you want to store action data.
- DocumentPath:
doc - Document Text:
text - Document Object Model:
dom - Taxonomy:
taxonomy - Automatic Extraction Results:
autoExtractionResults
- Add a Create App Task activity, so you can bind the
Content Validation Dataobject to the previously designed app and then send it out to Action Center for validation. In this example, configure the activity as follows:- Title:
CVD - Priority:
Medium - Apps:
Demo.Validation.Control.in.Apps - App Version: v2.0.0 After you select the App, and the corresponding version that you want to use for creating the action, the input properties of that app will be shown in the body of the activity.
-
In this example, one of the input properties is Action_Content_Validation_Data, which requires the document validation artifacts previously created:
contentValidationData.Figure 2. The Create App Task activity

-
- Title:
- Add a Wait for App Task and Resume activity to return the information about the action, and resume the workflow. In the Created App Task field, enter the output variable of the Create App Task activity.
- Add a Retrieve Document Validation Artifacts activity, to return the document validation artifacts after the user performed validation in Action Center. Pass the output variable of the Create Document Validation Artifacts activity as the input of the Retrieve Document Validation Artifacts activity.
提示:
You can also create dedicated output variables for additional information stored in the validation artifacts, such as AutomaticExtractionResults, and ValidatedExtractionResults.
3. 在 Action Center 中执行验证
- Open Action Center, and go to My Actions or Manage Actions.
- In the Unassigned tab, find the action you just created using the previous Studio automation.
- If you want to assign the action to yourself, select the desired action, and then select Assign to self.
- If you want to assign the action to another user, select More options for the desired action. Then select Assign to user, and select a user from the dropdown list.
- Go to the Pending tab, and complete the action, so the Studio workflow can be resumed.