UiPath Documentation
studio
2024.10
false
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

Studio 用户指南

使用参数

由于参数的性质,您将在“调用工作流文件”和“以交互方式启动工作流”活动时大量使用右击。这些参数可以在“活动”面板中的“工作流”>“调用”下找到,它们可用于浏览项目,并可以导入和编辑它们的参数。

使用参数的示例

为了举例说明如何通过“调用工作流文件”活动在自动化中使用参数,我们将创建两个单独的序列。第一个序列非常简单的,用于为参数赋值,第二个序列则调用该值并在消息框中显示该值。

  1. 创建一个新序列。

  2. 在“参数”面板中,创建参数 out_StoreValue

  3. 从“方向”列表中,选择“输出”,请勿将“参数类型”从“字符串”改为其他值。

  4. 将“赋值”活动添加到“设计器”面板。

  5. 在“属性”面板的“目标”字段中,添加 out_StoreValue 参数。

  6. 在“值”字段中输入字符串,例如“如何使用参数?”。

    第一个项目的呈现应如以下屏幕截图所示。

  7. 创建一个新序列。

  8. 创建一个字符串变量 FinalValue

  9. 将“调用工作流文件”活动添加到“设计器”面板。

  10. On the activity, select the Browse (…) button and browse for the previously created sequence.

  11. Select Import Arguments. The Invoked Workflow’s Arguments window is displayed. Note that the argument of the first sequence is displayed here.

  12. In the Value field, add the FinalValue variable and select Ok. The argument is imported and the value from it is going to be stored in the current project through the FinalValue variable.

  13. 在“调用工作流文件”下添加“消息框”活动。

  14. 例如,在“属性”面板的“文本”字段中,键入 FinalValue +“这要如何操作?”。

第二种自动化应如以下屏幕截图所示。

  1. 在第二个序列中按 F6。系统将正确执行自动化,消息框将显示所需的文本。

结果

The automation runs successfully. The message box in the second workflow displays the text assigned to the argument in the first workflow.

  • 使用参数的示例
  • 结果

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新