|
增强了操作系统对自定义软件包的支持
此版本的 软件包 SDK 显著扩展了自定义命令包的兼容性,现在开发者可以为 macOS、Windows 和基于云的机器人代理构建和部署软件包。
在 CommandPkg 部分中引入了一种新的许可代理类型,其值为 AllowedTarget.MAC_OS。 此增强功能允许开发人员明确启用其自定义软件包,以便在 macOS 代理上执行。 利用这项新功能,开发人员现在可以创建专为 macOS 操作系统设计和启用的自定义软件包。
为说明此功能,Concatenate.java 示例已更新并可在 Package SDK 中获取。 此更新的示例演示了现在如何在 Windows 和 macOS 设备上使用 Concatenate 操作。 通过在 CommandPkg 注解中指定 AllowedTarget.MAC_OS,自定义软件包现在兼容 macOS 代理,扩展了其在不同操作系统中的可用性。 以下代码片段来自 Concatenate.java,其中突出显示了实现 macOS 支持的修改:
//BotCommand makes a class eligible for being considered as an action.
@BotCommand
//CommandPks adds required information to be dispalable on GUI.
@CommandPkg(
//Unique name inside a package and label to display.
name = "concatenate", label = "[[Concatenate.label]]",
node_label = "[[Concatenate.node_label]]", description = "[[Concatenate.description]]", icon = "pkg.svg",
// Added AllowedTarget.MAC_OS to enable this package for macOS agents.
allowed_agent_targets = {AllowedTarget.HEADLESS, AllowedTarget.MAC_OS},
//Return type information. return_type ensures only the right kind of variable is provided on the UI.
return_label = "[[Concatenate.return_label]]", return_type = STRING, return_required = true)
public class Concatenate {
//Messages read from full qualified property file name and provide i18n capability.
private static final Messages MESSAGES = MessagesFactory
.getMessages("com.automationanywhere.botcommand.samples.messages");
//Identify the entry point for the action. Returns a Value<String>
|