Apps
最新
False
横幅背景图像
Apps 用户指南
上次更新日期 2024年4月26日

规则:触发器工作流

使用“触发器工作流”规则调用 Attended 自动化中的特定 .xaml 文件。

docs image
重要提示:

The Trigger Workflow rule helps improve data transfer between Apps and attended robots. To leverage the instant communication with the UiPath® Robot, you must use Studio projects that were designed using the Apps-Workflow Communication template available in UiPath® Studio.

If the process is not running, the first instantiation of the Trigger Workflow rule starts the process through Robot JS, opening the communication channel between UiPath® Apps and UiPath® Robot.

工作流文件

单击“工作流文件”字段将打开“资源”面板,其中显示可用的流程及其工作流文件。

重要提示:

The panel lists only the .xaml files that were marked as entry points in the UiPath® Studio project.

选择在操作控件时要执行的工作流。选择后,以下属性将可用:

  • 输入覆盖

  • 开始时间

  • 完成时

  • 错误

输入覆盖

在本部分中,您可以设置工作流的输入参数的值。

单击“输入覆盖”字段将打开“资源”面板,该面板显示所选 .xaml 文件的可用输入/输出参数。

选择输入参数,并将其值设置为应用程序中输入控件的值。

工作流的输入参数具有以下语法:

Processes.<process_name>.<selected_xaml_file>.<input_argument_name>

Apps 控件的值表达式具有以下语法:

<Apps_MainPage_name>.<input_control_name>.value

例如:您的 Studio 工作流中有一个名为“argument_1”的输入参数。应用程序中有一个名为“text1”的文本控件。则要将工作流参数绑定到 Apps 中的控件值,请在“输入值”字段中写入以下表达式:MainPage.text1.Value

开始时间

在此部分中,您可以定义要在工作流执行开始后立即执行的规则。

例如:对于需要更长时间执行的工作流,您可以在此部分中显示微调框图标,然后在“完成时”部分中隐藏微调框。

完成时

在本部分中,您可以定义要在工作流执行完成后执行的规则。

例如:对于需要更长时间执行的工作流,您可以在“开始时间”部分显示微调框图标,并在此部分将其隐藏。

错误

在本部分中,您可以定义工作流遇到错误时要执行的规则。

例如:要跟踪故障,您可以添加“显示消息”规则。然后,您可以指定错误的标题、消息和类型。

示例项目

To make it easier for you to observe the instant communication between UiPath® Apps and UiPath® Robot, we have prepared a sample project. Proceed with the following steps:

  1. 将其解压缩到本地设备上的文件夹中。它应包含:

    • Real Time City Weather Automation 文件夹 - Studio 项目
    • Real Time City Details.uiapp 文件 - Apps 项目
    • Read Me.txt 文件 - 项目说明
  2. 在 Studio 中,浏览到示例项目并打开 project.json 文件。
  3. 将项目发布到 Orchestrator 中的个人工作区。系统将自动创建相应流程。

  4. 在 Apps 中,通过导入 Apps 项目来创建新应用程序。

  5. 将引用的流程替换为在将项目发布到您的个人工作区时自动创建的流程。

    备注:

    如果您在从 Studio 发布时重命名了流程,请替换任何绑定以匹配新名称。

  6. 预览您的应用程序。

  7. 搜索城市,然后按 Enter 键。请注意“城市详细信息”部分如何立即更新信息。

  8. 单击“获取天气详细信息”和“获取污染详细信息”按钮。请注意字段如何立即更新信息。

第一次计算需要更长时间,因为它是作业的第一个实例化。 之后,作业将继续运行并立即返回结果。 当您关闭 Apps 会话时,作业将终止。

  • 工作流文件
  • 输入覆盖
  • 开始时间
  • 完成时
  • 错误
  • 示例项目

此页面是否有帮助?

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