- Primeros pasos
- Para administradores
- Proyectos de flujo de trabajo de RPA
- Crear un flujo de trabajo RPA a partir de una idea
- Creación de un proyecto
- Cómo iniciar un flujo de trabajo de RPA
- Gestionar archivos y carpetas de proyecto
- Conectar flujos de trabajo de RPA a tus cuentas
- Configurar actividades
- Gestionar las actividades de un proyecto
- Transferir valores entre actividades
- Iterar a través de los elementos
- Gestionar los datos en un proyecto
- Configurar un proyecto para usar tus datos
- Usar recursos de archivos y carpetas
- Configuración local para proyectos de flujo de trabajo y aplicación RPA
- Proyectos de aplicación
- Aplicaciones en Studio Web
- Diseñar proyectos de aplicación
- Depuración de proyectos de aplicación
- Publicar, implementar y actualizar proyectos de aplicaciones
- Importar y exportar proyectos de aplicación
- Trabajar con entidades en un proyecto de aplicación
- Crear aplicaciones accesibles
- Añadir descriptores accesibles
- La etiqueta Accesible
- Uso del control Pestaña para la accesibilidad
- Diseñar listas y encabezados accesibles
- Diseño de aplicaciones receptivas
- Relación de contraste de color
- Estilos preestablecidos y asignaciones a nivel de aria para el control Encabezado
- Limitaciones conocidas
- Visión general de los controles
- Botón
- Casilla de verificación
- HTML personalizado
- Selector de fechas
- Lista desplegable
- Cargador de archivos
- Cargador de archivos múltiples
- Lista desplegable de selección múltiple
- Botón de radio
- Editor de texto enriquecido
- Control deslizante
- Interruptor
- Área de texto
- Cuadro de texto
- Cuadro de texto (correo electrónico)
- Cuadro de texto (Número)
- Controles de iconos
- Establecer un contexto externo utilizando parámetros de consulta
- Establecer un contexto externo utilizando eventos externos
- Utilizar matrices para rellenar controles desplegables, desplegables de selección múltiple y botones de opción
- Utilizar controles tabulares con entidades de Data Service en proyectos de aplicación
- Insertar agentes conversacionales
- Actividades de la aplicación
- Procesos de agente
- Caso de Maestro
- Lienzo de flujo en Maestro Orchestrate
- Agents
- Funciones
- Funciones
- Soluciones
- Flujos de trabajo de API
- Pruebas
Funciones
Add a Python or TypeScript/JavaScript function to a Studio Web solution, set it up from a sample or from your IDE, debug it, and call it from other projects in the solution.
A function is a project that holds code-first logic, written in Python or in TypeScript/JavaScript. You add a function to a solution, and the other projects in the solution call it as a job. For how to write functions with the SDKs and the UiPath CLI, refer to About Functions in the Functions guide.
What you can do with a function in Studio Web depends on its language:
| Acción | Python | TypeScript/JavaScript |
|---|---|---|
| View the code | Sí | Sí |
| Edit the code | No. Edit the code in your IDE, then push it to Studio Web. | Sí |
| Debug, with breakpoints | Sí | Sí |
Add a function to a solution
You can add a function only to an existing solution. The Start building window doesn't list it.
- Abre la solución en Studio Web.
- In the Explorer panel, select Add to solution.
- Under Building blocks, select Function.
Studio Web adds the project to the solution and opens the Setup your function page. To set up the function, start from a sample or bring the code from your IDE.
Set up a function from a sample
-
On the Setup your function page, under Quick start, select Python or TypeScript / JavaScript.
If the page doesn't show a language choice, only Python functions are available in your organization.
-
Select Start with a simple sample.
Studio Web adds the sample files to the project and opens the code file. The Python sample adds two numbers. The TypeScript sample returns a greeting.
Both samples run as jobs. To build an HTTP function, which a coded app calls as its backend, refer to HTTP triggers and routing in the Functions guide.
Set up a function from your IDE
In a Cloud Workspace solution
- If the Setup your function page shows a language choice under Quick start, select the language of your function.
- Under Sync from your IDE into Studio, copy the project key, and add it to the
.envfile of your function project. - Push the project from your IDE with the command shown on the page:
uipath pushfor Python, oruip function pushfor TypeScript/JavaScript.
For how to create a function project in your IDE, refer to Getting started for Python, or Getting started with JavaScript.
For the options of the push command for TypeScript/JavaScript, refer to uip function push in the UiPath CLI guide.
In a Local Workspace solution
In a solution stored on your machine, the Setup your function page shows Add your project instead of the sync steps.
- Create the function project in your IDE. For a Python function, generate it with
uipath init --type function. - Add the project files to the solution folder, the local folder that Studio Web uses to access your project files.
For more information about local solutions, refer to Solutions in the Local Workspace.
Debug a function
- Optional: in the Properties panel of the function, choose the function to debug in the Entrypoint list.
- In the toolbar, open the Debug menu and select Debug configuration.
- On the Entrypoint arguments tab, under Input Arguments, enter a value for each input of the function. The fields match the input that the function declares.
- Optional: under Environment Variables, define the environment variables that the function reads at runtime. Studio Web masks secrets in the editor.
- Selecciona Guardar.
- Optional: to pause the run on a line, select the area to the left of the line number to add a breakpoint.
- In the toolbar, select Debug.
The Logs panel shows the progress of the run and the output of the function. The bottom panel shows the execution trace, with the input and output of each traced step. When the run pauses at a breakpoint, use Continue, Next step, or Stop in the toolbar.
Call a function from another project
To call a function from an RPA workflow in the same solution:
- Open the RPA workflow and add the Run Job activity.
- In Process name, select the function under Defined resources.
- Select Input arguments.
- In the Data Mapping window, map each input of the function to a variable.
- Selecciona Guardar.
For the other ways to call a function, such as from a Maestro process, an agent, or an app, refer to Invoking functions in the Functions guide.
Publish a function
You can't publish a function project on its own. Studio Web publishes and deploys a function with its solution. For details, refer to Publishing and deploying solutions.