Package SDK v.29 release

Review what's new in the Automation 360 Package SDK for the v.29 release.

What's new

SDK download link: A360-package-sdk-2.8.0.zip
return_Direct attribute

A new attribute return_Direct= true is added at the action level. It will show only a single option to select the Record type variable in the output.

For example:

@BotCommand
@CommandPkg(
        return_label = "[[AddColumn.return_label]]",        
        node_label = "[[AddColumn.node_label]]",
        label = "[[AddColumn.label]]",        
        description = "[[AddColumn.description]]",        
        name = "addColumn",        
        icon = "record.svg",        
        return_type = DataType.RECORD,        
        return_Direct = true,        
        return_required = true,        
        minimum_controlroom_version = "17917",        
        minimum_botagent_version = "21.134",        
        documentation_url = RECORD_ADD_COLUMN_URL,        
        documentation_widget_page = RECORD_ADD_COLUMN_WIDGET)
OAUTHCONNECTION attribute

A new attribute type, OAUTHCONNECTION, is added to get an access token from the Control Room's preconfigured OAuth Connection value.

For example:

@Idx(index = "1", type = AttributeType.OAUTHCONNECTION)
@Pkg(label = "[[OAuthConnectionTypeDemo.connection.label]]")
OAuthConnection connection
A new rule VariableMapAllowedDataTypes is added to the VARIABLEMAP

VariableMapAllowedDataTypes allows you to filter the UI for a particular variable type. VariableMap is a control that allows you to add variable selection for any action (in the bot editor UI). With the VariableMapAllowedDataTypes filter, you can restrict the datatype of variables that can be used in an action. For instance, if you set the VariableMapAllowedDataTypes to String, it will list only string variables within an action.


@Idx(index = "4", type = VARIABLEMAP)
        @Pkg(label = "[[LogVariables.selectVariable.label]]")
        @NotEmpty
        @VariableType(DataType.VARIABLEMAP)
        @VariableMapAllowedDataTypes({
            DataType.STRING,
            DataType.NUMBER,
            DataType.BOOLEAN,
            DataType.DATETIME
        })
        Map<String, Value> variables
@DesktopOperationContext annotation

The new annotation @DesktopOperationContextis used to inject the DesktopOperationContext in DesktopOperation, similar to GlobalSessionContext.

This annotation is applied on property with the setter method so that the generated file can set DesktopOperationContext to the target file.

By injecting DesktopOperationContext, the following property can be accessible in DesktopOperation from the GlobalSessionContext:

  1. getUserToken
  2. getCrUrl
  3. resolveResource
  4. getExternalEnvironment
  5. getProxyConfig
  6. botId
  7. getResources

@BotCommand(commandType = BotCommand.CommandType.DESKTOP_OPERATION_BUTTON)
@CommandPkg(name = "RESTRecorder", desktop_operation_name = "RESTRecorder")
public class RecorderOperation {

    private static final Logger LOGGER = LogManager.getLogger(RecorderOperation.class);

    @Request private DesktopOperationButtonRequest request;

    @DesktopOperationContext    private com.automationanywhere.toolchain.runtime.operation.context.DesktopOperationContext context;

    public void setRequest(DesktopOperationButtonRequest request) {
        this.request = request;
    }

    public void setContext(
            com.automationanywhere.toolchain.runtime.operation.context.DesktopOperationContext                    context) {
        this.context = context;
    }