Paquete SDK v.29

Revise las novedades en el Paquete SDK Automation 360 para la versión v.29.

Novedades

Enlace de descarga de SDK: A360-package-sdk-2.8.0.zip
atributo return_Direct

Se añade un nuevo atributo return_Direct= true en el nivel de acción. Sólo mostrará una única opción para seleccionar la variable Tipo de registro en la salida.

Por ejemplo:

@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,        
        allowed_Agent_Targets = AllowedTarget.HEADLESS)
Atributo OAUTHCONNECTION

Se añade un nuevo tipo de atributo, OAUTHCONNECTION, para obtener un token de acceso a partir del valor preconfigurado OAuth Connection de Control Room.

Por ejemplo:

@Idx(index = "1", type = AttributeType.OAUTHCONNECTION)
@Pkg(label = "[[OAuthConnectionTypeDemo.connection.label]]")
OAuthConnection connection
Se añade una nueva regla VariableMapAllowedDataTypes a la VARIABLEMAP

VariableMapAllowedDataTypes permite filtrar la interfaz de usuario para un tipo de variable concreto. VariableMap es un control que permite añadir la selección de variables para cualquier acción (en la interfaz de usuario del editor de bots). Con el filtro VariableMapAllowedDataTypes, puede restringir el tipo de datos de las variables que se pueden utilizar en una acción. Por ejemplo, si establece VariableMapAllowedDataTypes en String, sólo se mostrarán las variables de cadena dentro de una acción.


@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
Anotación @DesktopOperationContext

La nueva anotación @DesktopOperationContext se utiliza para inyectar la DesktopOperationContext en DesktopOperation, de forma similar a GlobalSessionContext.

Esta anotación se aplica en la propiedad con el método setter para que el archivo generado pueda establecer DesktopOperationContext en el archivo de destino.

Inyectando DesktopOperationContext, se puede acceder a la siguiente propiedad en DesktopOperation desde 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;
    }