UiPath Documentation
studio
latest
false
Important :
La localisation du contenu nouvellement publié peut prendre 1 à 2 semaines avant d’être disponible.

Guide de l'utilisateur de Studio

Invocation d’automatisations codées à l’aide de bibliothèques

Vous pouvez réutiliser des automatisations codées dans des automatisations low-code (XAML) et codées (CS) en les publiant dans une bibliothèque et en les invoquant dans un autre projet.

Remarque :

La connexion par défaut d'une bibliothèque exportée fonctionnera dans d'autres projets uniquement si le projet importé se trouve dans le même locataire que le projet de bibliothèque d'origine.

Étapes

  1. Publiez dans une bibliothèque un projet Studio contenant à la fois des automatisations low-code et codées.

Dans le cadre de notre exemple, la bibliothèque sera myFavoriteLibrary.

  1. Open a different project, and select Manage Packages.
  2. Under All Packages, search for and install myFavoriteLibrary.
  3. In the Activities panel of your project, follow these steps according to the type of automation you want to reuse the workflows in:
    • Pour les automatisations low-code : glissez-déposez dans votre workflow actuel les workflows du package de bibliothèque installé.
    • Pour les automatisations codées : appelez le service correspondant au nom de la bibliothèque et accédez au workflow à partir du package de bibliothèque installé.
      Remarque :

      Le nom du service commence toujours par une lettre minuscule (par exemple, myFavoriteLibrary).

      myFavoriteLibrary.<WorkflowFromThatLibrary>()
      myFavoriteLibrary.<WorkflowFromThatLibrary>()
      
  4. When you include the coded automation into another project as an invoked workflow in XAML files, you can modify its arguments. These arguments are available as properties inside the activity that invokes the coded automation. Optionally, you can also edit the arguments defined in the library as Activity Properties. To do this, go to the library project, open the context menu for the workflow you wish to export, and select Activity Layout. This action displays the activity properties window that allows you to configure different options depending on the library compatibility (Windows-Legacy, Windows, Cross-platform). Unlike low-code automations, you cannot configure an icon or color for coded automations in libraries. Visit Configuring the Layout of an Activity for more information.

Figure 1. La fenêtre Propriétés de l’activité (Activity Properties) dans laquelle vous pouvez configurer la mise en page de l’activité

Résultat

The coded automations from the library are available in your project and can be invoked in both low-code and coded automations.

  • Étapes
  • Résultat

Cette page vous a-t-elle été utile ?

Connecter

Besoin d'aide ? Assistance

Vous souhaitez apprendre ? UiPath Academy

Vous avez des questions ? UiPath Forum

Rester à jour