- 发行说明
 - 入门指南
 - 安装
 - 配置
 - 集成
 - 身份验证
 - Working with Apps and Discovery Accelerators
 - AppOne 菜单和仪表板
 - AppOne 设置
 - TemplateOne 1.0.0 菜单和仪表板
 - TemplateOne 1.0.0 设置
 - TemplateOne menus and dashboards
 - TemplateOne 2021.4.0 设置
 - Purchase to Pay Discovery Accelerator 菜单和仪表板
 - 购买到付款 Discovery Accelerator 设置
 - Order to cash Discovery Accelerator 菜单和仪表板
 - “订单到现金” Discovery Accelerator 设置
 - Basic Connector for AppOne
 - SAP Connectors
 - 适用于 AppOne 的 SAP 订单到现金连接器
 - 适用于 AppOne 的 SAP 采购到付款连接器
 - SAP Connector for Purchase to Pay Discovery Accelerator
 - SAP Connector for Order-to-Cash Discovery Accelerator
 - Superadmin
 - 仪表板和图表
 - 表格和表格项目
 - 应用程序完整性
 - How to ....
 - 使用 SQL 连接器
- Introduction to SQL connectors
 - Setting up a SQL connector
 - CData Sync extractions
 - Running a SQL connector
 - Editing transformations
 - 释放 SQL 连接器
 - Scheduling data extraction
 - Structure of transformations
 - Using SQL connectors for released apps
 - Generating a cache with scripts
 - Setting up a local test environment
 - Separate development and production environments
 
 - 实用资源
 

Process Mining
请按照以下步骤操作,以便能够在平台中使用 R 脚本。
| 
                               步骤  | 
                               操作  | 
|---|---|
| 
                               1  | 
                               从以下位置下载最新版本的 R 包 https://cran.r-project.org/bin/windows/base/。  | 
| 
                               2  | 
                               在服务器上安装 R。 注意: 这必须是安装了 UiPath Process Mining 的服务器。
                               
                              
                            | 
| 
                               3  | 
                               找到安装目录并找到 Rscript.exe 的路径。 例如:C:/Apps/Rscript.exe  | 
R 已安装在服务器上,开发者可以使用连接字符串连接到它。
需要安装路径才能为 R 脚本创建连接字符串。
从一些虚拟数据开始,以测试您的工作区设置。 例如,使用“ 示例:创建 Python 脚本”中所述的“Hello World”示例。
然后,虚拟 R 脚本将包含:
write("Hello world!", stderr()); quit("default", 1)
简要概述
在此示例中,将创建一个 R 脚本,用于根据追踪对案例进行聚类。
步骤
- 设置服务器设置;
 - 编写脚本。
 - 设置数据源;
 - 设置脚本数据源;
 
通用脚本数据源需要用于要运行的所有外部流程的处理程序。
请按照以下步骤为 R 脚本添加脚本处理程序。
| 
                               步骤  | 
                               操作  | 
|---|---|
| 
                               1  | 
                               转到“超级管理员设置”选项卡。  | 
| 
                               2  | 
                               添加一个字段  
                              
                              GenericScriptHandlers,并将一个具有一个键“r”的对象作为值,该键将 Python 可执行文件的路径作为值。例如:
                              
  | 
| 
                               3  | 
                               单击“保存”。  | 
在文本编辑器中,新建一个空白文本文件,然后输入以下代码。
## get command line arguments
args <- commandArgs(trailingOnly=TRUE)
inputfile <- args[1]
## read csv file
input <- file(inputfile, 'r')
df <- read.table(input, header=TRUE, sep=";")
## pre-processing
df <- table(df)
df <- as.data.frame.matrix(df)
df <- df[, sapply(data.frame(df), function(df) c(length(unique(df)))) > 1] #remove columns with unique value 
## cluster
df <- scale(df)
kc <- kmeans(df, centers = 5)
cluster <- kc$cluster
## output
resultdata <- cbind(rownames(df), cluster)
colnames(resultdata)[1] <- 'Case ID'
write.table(resultdata, row.names = FALSE, sep=";", qmethod = "double")## get command line arguments
args <- commandArgs(trailingOnly=TRUE)
inputfile <- args[1]
## read csv file
input <- file(inputfile, 'r')
df <- read.table(input, header=TRUE, sep=";")
## pre-processing
df <- table(df)
df <- as.data.frame.matrix(df)
df <- df[, sapply(data.frame(df), function(df) c(length(unique(df)))) > 1] #remove columns with unique value 
## cluster
df <- scale(df)
kc <- kmeans(df, centers = 5)
cluster <- kc$cluster
## output
resultdata <- cbind(rownames(df), cluster)
colnames(resultdata)[1] <- 'Case ID'
write.table(resultdata, row.names = FALSE, sep=";", qmethod = "double")请按照以下步骤操作。
| 
                               步骤  | 
                               操作  | 
|---|---|
| 
                               1  | 
                               将文本文件另存为 
                              
                           script.r 。
                               | 
| 
                               2  | 
                               将 
                              
                           script.r文件上传到您的工作区。
                               | 
.CSV的字符串。 应将其放置在“ 全局 ”表中,因为它将用作表定义中的输入。
               csvtable函数定义输入数据。
               在此示例中,我们有一个包含“事件”表的应用程序。请参见下图。
R_input_data 。
               | 
                               步骤  | 
                               操作  | 
|---|---|
| 
                               1  | 
                               在开发环境中打开应用程序,然后转到“数据”选项卡。  | 
| 
                               2  | 
                               选择“ 全局 ”表格。 右键单击表格项目列表中的“ 全局变量 ” 表格,然后选择 “新建表达式…”。  | 
| 
                               3  | 
                               将类型设置为“查找”。  | 
| 
                               4  | 
                               选择“ 事件 ”作为输入表。  | 
| 
                               5  | 
                               输入以下表达式: 
  | 
| 
                               6  | 
                               在名称字段中输入 R_input_data 。  | 
| 
                               7  | 
                               单击“ 确定 ”,将表达式属性保存在“ 全局 ”表中。  | 
将在“ 全局变量 ”表中创建表达式属性。 请参见下图。
接下来,在将调用脚本的应用程序中设置一个数据源表。
请按照以下步骤设置脚本数据源。
| 
                               步骤  | 
                               操作  | 
|---|---|
| 
                               1  | 
                               在“ 数据 ” 选项卡中,新建一个“连接字符串”表。  | 
| 
                               2  | 
                               将 
                              
                              
                           New_table重命名为RscriptExample 。
                               | 
| 
                               3  | 
                               右键单击  
                              
                              
                           RscriptExample 表格,然后单击“高级”>“选项…”。
                               | 
| 
                               4  | 
                               在“ 表格选项 ”对话框中,将“ 表格作用域 ”设置为“ 工作区”。  | 
| 
                               5  | 
                               双击 
                              
                              
                           RscriptExample表格以打开“ 编辑连接字符串表格” 窗口。
                               | 
| 
                               6  | 
                               输入以下内容作为“ 连接字符串”: ``'driver={mvscript  | 
| 
                               7  | 
                               输入以下内容作为 Query: 
 请参见下图。  | 
| 
                               8  | 
                               单击“ 确定”,然后单击“ 是” 以重新加载数据。  | 
加载数据时,系统会检测到新属性。 单击“ 是”(2x),然后单击“ 确定”。
Rscript_example表现在具有两个数据源属性: Case_ID 和 cluster。
               请参见下图。