Action Center
Más reciente
False
Imagen de fondo del banner
Action Center
Última actualización 26 de abr. de 2024

Vista previa
Crear definiciones de acción

Para vincular los campos de entrada de acción a los campos de Apps, necesitas una definición de acción.

1. Preparar la definición de la acción

Antes de añadir la definición de acción a Action Center, debes crear un esquema JSON para ella. El archivo debe seguir el estándar de esquema JSON. También puedes descargar el esquema de muestra, editarlo y cargar una versión modificada del mismo.

  1. Comience agregando una llave abierta para indicar el inicio del objeto JSON.
  2. Dentro del objeto JSON, define las propiedades Name y Description como cadenas, junto con sus valores.
    {
        "Name": "Sample Definition",
        "Description": "Sample Definition Description"{
        "Name": "Sample Definition",
        "Description": "Sample Definition Description"
    
  3. Añade una propiedad Allowed Actions como una matriz de cadenas para especificar las acciones permitidas que puedes realizar al final de la acción. Los valores deben ser el equivalente a Aprobar o Rechazar.
    "AllowedActions": [
            "Start On-boarding",
            "Request more details"
        ],"AllowedActions": [
            "Start On-boarding",
            "Request more details"
        ],
    
  4. Añade una propiedad Schema y asígnale un objeto que se adhiera al estándar del esquema JSON: http://json-schema.org/draft-07/schema#.
    "Schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "type": "object","Schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "type": "object",
    
  5. Dentro del objeto properties , define cada propiedad que quieras incluir en el esquema. Para cada propiedad, especifica su type y description.
    Cada propiedad en Schema es el equivalente a los campos de entrada que añadirás en la acción Aplicación.
    "properties": {
                "employee_id": {
                    "type": "string",
                    "description": "The unique identifier of the employee."
                },
                "first_name": {
                    "type": "string",
                    "description": "The first name of the employee."
                },
                "last_name": {
                    "type": "string",
                    "description": "The last name of the employee."
                },
                "email": {
                    "type": "string",
                    "format": "email",
                    "description": "The email address of the employee."
                },
                "address": {
                    "type": "object",
                    "properties": {
                        "street": {
                            "type": "string",
                            "description": "The street address of the employee."
                        },
                        "city": {
                            "type": "string",
                            "description": "The city where the employee resides."
                        },
                        "state": {
                            "type": "string",
                            "description": "The state where the employee resides."
                        },
                        "zip_code": {
                            "type": "string",
                            "description": "The zip code of the employee's address."
                        },
                        "country": {
                            "type": "string",
                            "description": "The country where the employee resides."
                        }
                    },
                    "required": [
                        "street",
                        "city",
                        "state",
                        "zip_code",
                        "country"
                    ],
                    "description": "The address of the employee."
                },
                "hire_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The date the employee was hired in the format YYYY-MM-DD."
                },
                "salary": {
                    "type": "number",
                    "minimum": 0,
                    "description": "The salary of the employee."
                }
            }"properties": {
                "employee_id": {
                    "type": "string",
                    "description": "The unique identifier of the employee."
                },
                "first_name": {
                    "type": "string",
                    "description": "The first name of the employee."
                },
                "last_name": {
                    "type": "string",
                    "description": "The last name of the employee."
                },
                "email": {
                    "type": "string",
                    "format": "email",
                    "description": "The email address of the employee."
                },
                "address": {
                    "type": "object",
                    "properties": {
                        "street": {
                            "type": "string",
                            "description": "The street address of the employee."
                        },
                        "city": {
                            "type": "string",
                            "description": "The city where the employee resides."
                        },
                        "state": {
                            "type": "string",
                            "description": "The state where the employee resides."
                        },
                        "zip_code": {
                            "type": "string",
                            "description": "The zip code of the employee's address."
                        },
                        "country": {
                            "type": "string",
                            "description": "The country where the employee resides."
                        }
                    },
                    "required": [
                        "street",
                        "city",
                        "state",
                        "zip_code",
                        "country"
                    ],
                    "description": "The address of the employee."
                },
                "hire_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The date the employee was hired in the format YYYY-MM-DD."
                },
                "salary": {
                    "type": "number",
                    "minimum": 0,
                    "description": "The salary of the employee."
                }
            }
    
    Si tienes objetos anidados, como address, según este ejemplo, defínelos de forma similar dentro del objeto properties , especificando su tipo y propiedades.
  6. Si se requieren ciertas propiedades, incluye una matriz required , donde se enumeran las propiedades que deseas marcar como necesarias en la acción.
    "required": [
                "employee_id",
                "first_name",
                "last_name",
                "email",
                "address",
                "salary",
                "hire_date"
            ]"required": [
                "employee_id",
                "first_name",
                "last_name",
                "email",
                "address",
                "salary",
                "hire_date"
            ]
    
  7. Cierra el objeto JSON añadiendo una llave de cierre.

2. Cargar la definición de la acción en Action Center

Una vez que hayas creado el esquema JSON de la definición de acción, puedes cargarlo en Action Center.

  1. Abre Action Center, ve a Configuración de administrador y selecciona Tenant.
  2. En la pestaña Definiciones de acción , selecciona Añadir definición de acción.
  3. Selecciona Descargar muestra de definición de acción para descargar un esquema JSON de muestra que te ayude a preparar la definición de acción.
  4. Selecciona Importar desde archivo y selecciona el archivo JSON que has preparado anteriormente.
  5. Introduce un nombre y una descripción adecuados para la definición de la acción y, a continuación, selecciona Crear.

Resultado: ahora puedes añadir la definición de acción como un control a tu aplicación de acción dentro de App Studio.

Was this page helpful?

Obtén la ayuda que necesitas
RPA para el aprendizaje - Cursos de automatización
Foro de la comunidad UiPath
Logotipo blanco de UiPath
Confianza y seguridad
© 2005-2024 UiPath. All rights reserved.