- Démarrage
- Pour les administrateurs
- Projets de workflow RPA
- Créer un workflow RPA à partir d'une idée
- Créer un projet
- Comment démarrer un workflow RPA
- Gestion des fichiers et dossiers du projet
- Connecter des workflows RPA à vos comptes
- Configurer les activités
- Gérer les activités d'un projet
- Transmission de valeurs entre les activités
- Naviguer dans les éléments
- Gérer les données d'un projet
- Configurer un projet pour utiliser vos données
- Utiliser des ressources de fichiers et de dossiers
- Configuration locale pour les projets de workflow RPA et d’application
- Projets d'application
- Applications dans Studio Web
- Concevoir des projets d'application
- Débogage de projets d'application
- Publier, déployer et mettre à niveau des projets d’application
- Importer et exporter des projets d'application
- Travailler avec des entités dans un projet d'application
- Créer des applications accessibles
- Ajout de descripteurs accessibles
- Le libellé Accessible
- Utilisation de la commande Onglet pour l'accessibilité
- Concevoir des listes et des en-têtes accessibles
- Conception d'application réactive
- Taux de contraste des couleurs
- Prédéfinir les styles et les mappages au niveau de l'air pour la commande En-tête
- Limites connues
- Définir un contexte externe à l'aide de paramètres de requête
- Définir un contexte externe à l'aide d'événements externes
- Utiliser des tableaux pour remplir les commandes Liste déroulante, Liste déroulante à sélection multiple et Bouton radio
- Utiliser des contrôles tabulaires avec des entités Data Service dans les projets d'application
- Intégrer des agents conversationnels
- Activités d'application
- Processus d’agent
- Cas Maestro
- Canevas de flux dans Maestro Orchestrate
- Agents
- Functions
- Functions
- Solutions
- Workflows d’API
- Tests
Functions
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:
| Action | Python | TypeScript/JavaScript |
|---|---|---|
| View the code | Oui (Yes) | Oui (Yes) |
| Edit the code | No. Edit the code in your IDE, then push it to Studio Web. | Oui (Yes) |
| Debug, with breakpoints | Oui (Yes) | Oui (Yes) |
Add a function to a solution
You can add a function only to an existing solution. The Start building window doesn't list it.
- Ouvrez la solution dans 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.
- Sélectionnez Enregistrer.
- 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.
- Sélectionnez Enregistrer.
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.