- 概述
- 应用程序事件
- 流程图生成器
- 标注
- 复杂场景
- 凭据
- Data Service
- 表单
- FTP
- IPC
- Automation Ops 管道
- 暂留
- 系统
- 发行说明
- 项目兼容性
- 受支持的字符编码
- “正则表达式构建器”向导
- 添加数据列
- 添加数据行
- 添加日志字段
- 加减日期
- 添加事务项目
- 添加队列项目
- 将项目附加至集合
- 将项目附加至列表
- 附加行
- 提示音
- 中断/退出循环
- 浏览文件
- 浏览文件夹
- 构建集合
- 构建数据表
- 批量添加队列项目
- 更改文本大小写
- 更改类型
- 检查 False
- 检查 True
- 清除数据表
- 从集合到数据表
- 注释
- 压缩文件/Zip 文件
- 复制文件
- 复制文件夹
- 合并文本
- 注释掉/禁用的活动
- 继续/跳过当前
- 创建文件
- 创建文件夹
- 创建列表
- 自定义输入
- 删除
- 删除文件
- 删除文件夹
- 删除存储文件
- 删除队列项目
- 禁用本地触发器
- Do While 循环
- 从 URL 下载文件
- 下载存储文件
- 启用本地触发器
- 评估业务规则
- 存在于集合中
- 提取/解压缩文件
- 从文本中提取日期和时间
- 提取文本
- 文件更改触发器
- 文件已存在
- 筛选集合
- 筛选数据表
- 文件夹存在
- 遍历循环
- 适用于文件夹中的每个文件
- 文件更改触发器 v3
- 查找和替换
- 查找匹配模式
- 对于文件夹中的每个文件夹
- 对于数据表中的每一行
- 将日期格式设置为文本
- 为值添加格式
- 从文本中生成数据表
- 获取资产
- 获取凭据/获取 Orchestrator 凭据
- 获取当前作业信息
- 获取环境文件夹
- 获取环境变量
- 获取文件信息
- 获取文件夹信息
- 获取作业
- 获取进程
- 获取行项目
- 获取密码
- 获取事务项目
- 获取用户名/密码
- 获取队列项目
- 全局变量更改触发器
- 输入对话框
- 调用代码
- 调用 COM 方法
- 调用 PowerShell
- 调用流程
- 调用 VBScript
- 调用工作流文件
- 是否为文本匹配
- 联接数据表
- 终止进程
- 启动工作流交互
- 列出存储文件
- 日志消息
- 查找数据表
- 手动触发器
- 合并集合
- 合并数据表
- 消息框
- 修改日期
- 修改文本
- 移动文件
- 移动文件夹
- 多重分配
- 向队列新增项目
- 通知全局变量已更改
- Orchestrator HTTP 请求
- 输出数据表
- 并行
- 并行的遍历循环
- 存在路径
- 推迟事务项目
- 流程终止触发器
- 流程启动触发器
- 流程跟踪作用域
- 发出警示
- 读取列表项目
- 读取文本文件
- 读取存储文本
- 删除数据列
- 删除数据行
- 删除重复行
- 从集合中删除
- 删除日志字段
- 替换匹配模式
- 重复次数
- 重复触发器
- 重命名文件
- 重命名文件夹
- 报告状态
- 重置计时器
- 恢复计时器
- 重试作用域
- 返回
- 运行本地触发器
- 运行代理
- 运行作业
- 运行并行流程
- 设置资产
- 发送电子邮件通知
- 设置凭据
- 设置环境变量
- 设置密码
- 设置任务状态
- 设置追踪状态
- 设置事务进度
- 设置事务状态
- 应停止
- 拆分文本
- 数据表排序
- 启动计时器
- 开始作业
- 停止作业
- 停止本地触发器
- 停止计时器
- 左侧/右侧的文本
- 要大写/小写的文本
- 时间触发器
- 触发器作用域
- 跟踪对象
- 超时作用域
- 更新行项目
- 更新列表项目
- 上传存储文件
- 等待下载
- 等待队列项目
- 先条件循环
- 工作流占位符
- 写入存储文本
- 写入文本文件
- 添加数据行
- AddQueueItem
- 添加事务项目
- 附加行
- BulkAddQueueItems
- 清除数据表
- 压缩 Zip 文件
- 复制文件
- 创建文件
- 创建文件夹
- 删除文件或文件夹
- 删除队列项目
- 删除存储文件
- 下载存储文件
- 提取解压缩文件
- 筛选数据表
- 获取资产
- 获取凭据
- GetJobs
- 获取队列项目
- GetQueueItems
- 获取本地路径的资源
- 获取行项目
- 获取事务项目
- 调用流程
- 联接数据表
- 列出存储文件
- 查找数据表
- 合并数据表
- 移动文件
- Orchestrator HTTP 请求
- OutputDataTable
- 存在路径
- 推迟事务项目
- 读取存储文本
- 读取文本文件
- 删除数据列
- 删除重复行
- 替换
- 设置资产
- 设置凭据
- SetTransactionProgress
- 设置事务状态
- 数据表排序
- 开始作业
- 停止作业
- 更新行项目
- 上传存储文件
- 等待队列项目
- 写入存储文本
- 写入文本文件
- 测试
- 发行说明
- 关于“测试”活动包
- 项目兼容性
- 项目设置
- Address
- AddTestDataQueueItem
- AttachDocument
- BulkAddTestDataQueueItems
- DeleteTestDataQueueItems
- GetTestDataQueueItem
- GetTestDataQueueItems
- GivenName
- LastName
- RandomDate
- RandomNumber
- RandomString
- RandomValue
- VerifyAreEqual
- VerifyAreNotEqual
- VerifyContains
- VerifyExpression
- VerifyExpressionWithOperator
- VerifyIsGreater
- VerifyIsGreaterOrEqual
- VerifyIsLess
- VerifyIsLessOrEqual
- VerifyIsRegexMatch
- VerifyRange
- Workflow Foundation

工作流活动
使用临时流程结果实时跟踪 Apps 中的进度
概述
为了更好地了解临时流程结果的工作方式,您可以构建此页面中描述的示例。
By following this procedure, you will build a process in Studio that involves sending intermediate data to UiPath Apps using the Send Interim Result activity. You will build an app that will display a progress bar (using Slider control) in real-time as the tables are populated with data.
对于此示例,我们将构建以下内容:
- 自动化流程
- 使用“UiPath Apps”的应用程序
教程
构建流程
The process from this tutorial is used to demonstrate the capabilities of the Interim Process Result activity. The process takes two inputs:
- 要处理的项目数。
- 每个项目中的步骤数。
该流程使用这些输入运行,并将以下临时结果发送到应用程序:
- 流程正在执行的当前项目。
- 项目中的当前步骤。
- 特定项目的进度百分比。
- 填充每个步骤的表格,包括时间戳。
-
打开 Studio ,创建一个新“流程”。
-
创建以下参数:
参数名称 方向 参数类型 默认值 in_number_of_steps输入 Int32 3 in_number_of_items输入 Int32 2 out_progress_percentage输出 Int32 - out_progress_datatable输出 数据表 - out_current_step输出 Int32 - out_current_item输出 Int32 - -
将“序列”活动拖动至“工作流设计器”
-
创建以下变量:
变量名称 变量类型 默认值 var_itemInt32 1 var_stepInt32 1 var_percentageInt32 0
-
-
在“序列”容器中添加“构建数据表”活动。
- 在“数据表”字段中添加“
out_progress_datatable”变量。 - 向表格添加四列:
- Item Number as
Int32. - Step Number as
Int32. - Time as
DateTime. - Progress % as
Int32.
- Item Number as
- Add a While activity below the Build Data Table activity and configure it as below:
- 在“数据表”字段中添加“
-
在“条件”字段中添加
var_item<=in_number_of_items。- Add a While activity in the Body.
- 在“条件”字段中添加
var_step<=in_number_of_steps。 - Add an Add Data Row activity in the Body.
- Add
{var_item,var_step,now(),(var_step/in_number_of_steps)* 100}in the ArrayRow field. - Add
out_progress_datatablein the DataTable field.
- Add a Delay activity below Add Data Row. Add
00:00:02in the Duration field (2 second). - Add a Send Interim Result activity below Delay.
- Add
out_progress_datatablein the Argument name field andout_progress_datatablein the Argument value field.
- Add a Multiple Assign activity below Send Interim Result.
- Add
var_percentagein the To field andConvert.ToInt32((var_step/in_number_of_steps) * 100)in the Value field.
- Add a Send Interim Result activity below Multiple Assign.
- Add
out_progress_percentagein the Argument name field andvar_percentagein the Argument value field.
- Add a second Send Interim Result activity before the previous one.
- Add
out_current_stepin the Argument name field andvar_stepin the Argument value field.
- Add a third Send Interim Result activity.
- Add
out_current_itemin the Argument name field andvar_itemin the Argument value field.
- Add a Multiple Assign activity below the last Send Interim Result activity.
- Add
var_stepin the To field andvar_step+1in the Value field.
- Add a Multiple Assign activity below the last While.
- Add
var_stepin the To field and1in the Value field. - Add
var_itemin the To field andvar_item+1in the Value field. - Add
var_percentagein the To field and1in the Value field.
- 在“条件”字段中添加
- Add a While activity in the Body.
结果
最后,您的工作流应与下图类似。

生成您的应用程序
本教程中的应用程序接收来自之前构建的流程的信息。 该应用程序显示从流程收到的以下临时结果:
- 流程正在执行的当前项目。
- 项目中的当前步骤。
- 特定项目的进度百分比。
- 填充每个步骤的表格,包括时间戳。
在开始构建应用程序之前,请确保已在 Orchestrator 中创建并发布“构建流程”部分中的自动化流程。
-
打开您现有的应用程序或启动一个新应用程序。
-
参考先决条件部分中的流程。
-
向页面添加容器。
-
Add a Header control in the container. Add App - Interim Process Results in the Text property. This will be the app title.
-
Add a second Header control below the previous one. Add Input in the Text property. Make sure that the font size is a bit smaller (for example,
20 px).- 在容器内添加一个文本框控件。在“值”绑定属性中添加先前引用的流程中的
in_number_of_items参数。在“默认文本”属性中添加2,并在“标签”属性中添加Number of items (iterations)。 - 在“文本框”控件右侧添加一个“分隔条” 。
- 在分隔条右侧添加“文本框”控件 。在“值”绑定属性中添加先前引用的流程中的
in_number_of_steps参数。在“默认文本”属性中添加3,并在“标签”属性中添加Number of steps in item。 - 在“文本框”右侧添加“按钮”控件。在“文本”属性中添加
Start Process。为“单击”事件配置“启动”流程规则。配置规则以启动在开头引用的流程,并将其标记为有人值守。
- 在容器内添加一个文本框控件。在“值”绑定属性中添加先前引用的流程中的
-
Add a Divider below the container.
-
Add a Header below the divider. Add Interim Process Result in the Text property.

-
Add a Container below the header.
-
Add two more Container control one inside each other.
- 在最后一个容器内添加“标签” 。在“文本”属性中添加
Current item being processed:。 - 在上一个标签旁边添加第二个标签。在“文本”属性中添加引用流程中的
out_current_item参数。
- 在最后一个容器内添加“标签” 。在“文本”属性中添加
-
Add a Container below the last one.
- 在最后一个容器内添加“标签” 。在“文本”属性中添加
Current step:。 - 在上一个标签旁边添加第二个标签。在“文本”属性中添加引用流程中的
out_current_step参数。
- 在最后一个容器内添加“标签” 。在“文本”属性中添加
-
在最后两个容器的右侧添加一个分隔条。

-
Add a Container to the right of the Divider and another Container inside the first one.
- 添加“标签”控件,并在“文本”属性中添加
Step completion % :。 - 再添加两个“容器”控件,并在最后一个控件中添加一个“标签”控件和一个“滑块”控件。在“标签”的“文本”属性中添加流程的
out_progress_percentage参数。配置滑块属性:将滑块增量配置为0,将默认值配置为0。
- 添加“标签”控件,并在“文本”属性中添加
-
Add a Divider below.
-
Add a Table control below the divider.
- 在“数据源”字段中添加流程的
out_progress_datatable参数。 - 添加“项目编号”列,并提供数据表流程中的
Item Number作为“来源” 。 - 添加一个“步骤编号”列,并提供数据表流程中的
Step Number作为来源。 - 添加一个“时间”列,并提供数据表流程中的
Time作为“来源” 。 - 添加“进度 %”列,并提供数据表流程中的
Progress %作为“来源” 。
- 在“数据源”字段中添加流程的
结果
最后,您的应用程序应如下所示:

结果
预览应用程序时,您可以按“启动流程”按钮。
该应用程序将为流程提供以下临时信息:
-
当前正在处理的项目
-
当前步骤
-
步骤完成 (百分比)
-
包含有关项目、步骤编号、时间戳和进度的信息的表格。

您还可以使用文本字段更改项目数或项目中的步骤。
示例工作流
要查看完整的工作流和应用程序或以供将来参考,请从此处下载文件 。