UiPath Documentation
coding-agents
latest
false
UiPath for Coding Agents 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

方法:使用 REFramework 实现基于队列的流程

使用 REFramework 模板构建事务 RPA 流程,该流程从 Orchestrator 队列中拉取项目,并提供重试、日志记录和异常处理功能。

本秘钥根据机器人企业框架 (REFramework) 模板构建事务流程:它从 Orchestrator 队列中拉取项目,处理每个项目,并以企业流程应有的方式处理重试和异常。本图展示了编码智能体如何与 UiPath 的标准模板配合使用,以实现有弹性的大批量自动化。

先决条件​

  • 为 UiPath 设置的编码智能体,可使用经过身份验证的会话(请参阅安装和设置)。
  • 一个至少包含 2 个示例项目的 Orchestrator 队列,或让智能体创建一个示例项目的请求。

构建流程​

  1. 在空项目文件夹中打开编码智能体。

  2. 描述任务并为模板命名:

    "使用 REFramework 模板创建新的 RPA 项目,以处理 Orchestrator 中的Invoices队列中的项目。对于每个项目,读取发票字段,将其过账到我们的财务系统,设置事务状态,并在失败时重试。”

  3. Review the generated project: the Init, Get Transaction Data, Process Transaction, and End Process states, the configuration file in the Data folder, and the built-in logging and exception handling.

  4. Complete the Process Transaction state with the business logic for each transaction.

  5. Set the queue, retry count, and assets without hard-coding them:

    • In a Config.json project, set the retry count in Config.json, select the queue on the Get Transaction Item activity in Framework\GetTransactionData.xaml, and read each asset with Get Asset or Get Credential in the workflow that uses it.
    • In a Config.xlsx project, set the queue name, retry count, and assets in Config.xlsx.
  6. 要求智能体运行工作流分析器和单个测试事务。

  7. 确认项目以正确的状态在队列中移动,例如成功、失败或已重试。

  8. 确认已记录异常。

结果:基于 REFramework 构建的队列驱动事务流程,具有重试、日志记录和异常处理功能。

备注:

生成的结构和运行命令因智能体和提示而异。从队列项目状态和日志中确认成功,而不是从智能体的“完成”消息中确认。

  • 先决条件​
  • 构建流程​

此页面有帮助吗?

连接

需要帮助? 支持(opens in new window)

想要了解详细内容? UiPath Academy(opens in new window)

有问题? UiPath 论坛(opens in new window)

保持更新