阅读和查看 Automation Anywhere 文档

Automation Anywhere Automation 360

关闭内容

内容

打开内容

在自定义包中为 If 条件添加条件

  • 已更新:1/07/2021
    • Automation 360 v.x
    • 版本
    • RPA 工作区

在自定义包中为 If 条件添加条件

在自定义包中添加条件。

Action 中创建条件值

  • 要创建条件,请将 BotCommand 注释的 commandType 属性的值设置为Condition
  • 要定义条件的输入方法,请使用注释 ConditionTest
@BotCommand(commandType = Condition)
@CommandPkg(label = "File exists", name = "fileExists",
        description = "Checks the file exists condition.",
        node_label = "file exists at {{sourceFilePath}}", icon = "")
public class Exist extends AbstractCondition {
    @ConditionTest
    public boolean test(@Idx(index = "1", type = FILE) @LocalFile @Pkg(label = "File path") @NotEmpty String sourceFilePath,
                        @Idx(index = "2", type = NUMBER) @Pkg(label = "How long you would like to wait for this condition 
                        to be true?(Seconds)",
                                default_value = "0", default_value_type = DataType.NUMBER)
                        @GreaterThanEqualTo("0") @LessThanEqualTo("99999") @NotEmpty @NumberInteger Double waitTimeout) {
 
        // Logic to check for the condition goes here
 
    }   
}
发送反馈