查看 软件包 SDK v.37 版本的新增内容。

新增内容

SDK 下载链接: A360-package-sdk-2.12.0.zip

文档下载链接: A360-package-sdk-2.12.0-javadoc.zip

增强了操作系统对自定义软件包的支持

此版本的 软件包 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>
重要: 请注意,macOS 代理支持目前仅适用于任务机器人,尚不适用于 API 任务
  • macOS 代理支持:CommandPkg 部分引入了新的 AllowedTarget.MAC_OS。 这样,开发人员就可以明确启用其自定义软件包,以便在 macOS 机器人代理上执行。
  • Windows 和 Cloud 代理支持: 现有的 AllowedTarget.HEADLESS 值确保自定义软件包可以在 Windows 和基于云的机器人代理中无缝使用。
  • 特定于 Windows 的支持: AllowedTarget.WINDOWS 值仍可供开发人员使用,他们需要将自定义软件包的使用范围限制为 Windows 机器人代理。