Subscribe

UiPath Studio

The UiPath Studio Guide

About Libraries

A Library is a package which contains multiple reusable components. Libraries are saved as .nupkg files and can be installed as dependencies to workflows using Package Manager.

For example, you could create a library that collects data from an Excel spreadsheet and appends it to another, as explained in the Creating a Basic Library page. Next, the library can be packaged and used in other processes as an activity.

Managing Reusable Component Activities

A reusable component activity represents one or more workflows packaged together as a .nupkg file, and utilized in other processes.

Creating a Library

  1. Go to the Studio Backstage View > Start > Library. This opens the New Blank Library window.
  2. Fill in the name and pick a location for the library. The default location is C:\Users\<current_user>\Documents\UiPath. Add a description and select Create. The new library is created and saved on your local machine.
    Note: The library name cannot exceed 128 characters, and the description cannot exceed 500 characters.
  3. The Project Panel displays the tree view with the Project folder, Dependencies, and the NewActivity.xaml which contains the actual workflow.

📘

Note:

By default, the dependencies available for new libraries are the same as for blank new projects, namely UiPath.Excel.Activities, UiPath.Mail.Activities, UiPath.System.Activities, and UiPath.UIAutomation.Activities, with the Lowest Applicable Version runtime rule.

Add a tooltip and help link to a library by opening the Properties window.

500

The tooltip is visible in the Activities panel after you've added the new activity. The Help Link opens when you press F1 on the selected activity.

When creating a new library from a template, the Designer panel doesn’t automatically open the .xaml file, unless the library template has a Main.xaml file.

Add an annotation to a used argument in the library to have it displayed later as a tooltip in the activity's Properties panel. Read the Arguments Panel to find out more about adding annotations to arguments.

581

📘

Note:

In the case of libraries, it is recommended to use Nothing to assign a null value to a variable, rather than "". This is done to avoid any inconsistencies when using the packaged library as a dependency to a project.

Adjust Library Settings

A set of individual settings can be established for a library project. Such settings are available in the Project Settings window, which can be opened by clicking the settings_icon in the Project panel.

563

The Project Settings window enables you to change the library’s name and description. Set the Include Sources toggle to Yes to package all .xaml sources within the generated assembly file, including workflows that were previously made private.

Publishing a Library

  1. In the Design ribbon tab, select Publish. The Publish Library window opens.
814
  1. In the Publish Location category, set the library to be published to Orchestrator, a custom NuGet feed or on the local machine. The API key can be used for authentication to the custom NuGet feed.
    Once the library has reached Orchestrator, it is stored either in the host feed or in the tenant feed, as configured on the Settings page. Details about libraries feeds here.

📘

Note:

Due to a NuGet limitation, you cannot publish libraries to locations that contain user-restricted subfolders using Windows environment path variables.

  1. In the Release Notes category, type in the details about the version and other relevant information. Release notes for published projects are visible in the Packages section in Orchestrator. Please note that the Release Notes field accepts a maximum of 10,000 characters.
  2. Add a New Version to the project, and check the Is Prerelease box to mark the version as alpha if needed. Please note that this automatically changes the project’s version schema to semantic. When publishing a new version of the file locally, make sure that the custom location does not already include a file with the same proposed version number. For more details about project versioning, check the About Automation Projects page.

📘

Note:

Release notes for published libraries are visible only in Orchestrator, due to a NuGet v3 limitation.

  1. In the Library Settings category, set a name for the Activities Root Category or leave the default library name. This creates a new category for the reusable component in the Activities panel. Please note that the previously set root categories are memorized in the drop-down list.
  2. Select the check box next to the Include Sources to package all .xaml sources within the generated assembly file, including workflows that were previously made private. This is helpful during debugging workflows.
  3. In the Certificate Signing section, add a local Certificate Path next to the Certificate box. Furthermore, add Certificate Password and Optional Certificate Timestamper if needed. For more details, check out the Signing Packages page.

📘

Note:

Currently, only .pfx and .p12 certificate extensions are accepted for signing projects.

  1. Select Publish. The entire project folder is archived into a .nupkg file, and uploaded to Orchestrator, the custom NuGet feed or saved in the local directory.
  2. If the project is published successfully, the Info dialog box is displayed, which contains:
    • The name under which the package was published to Orchestrator or locally;
    • The version number under which the package was published;
    • The location where the project was published if the project was published locally.
    • The Copy to Clipboard option.

Limitations when Publishing Libraries

The following limitations prevent library projects from being published:

  • Libraries with special characters in the names of .xaml files they contain may not be successfully published.
  • Libraries containing Invoke Workflow File activities with the Isolated option selected cannot be published. An error message is displayed in the Output panel.
  • When using Invoke Workflow File activity, make sure the invoked file is located in the same folder as the library project.
  • The Launch Workflow Interactive activity is not supported for libraries.
  • Using Invoke Workflow File inside a library to reference the library itself is not supported.

Adding Reusable Components to Automation Projects

  1. Open or create a new project.
  2. Under the All Packages category, pick the feed under which the library is saved and install the package.
  3. Select OK and the package is added to the project definition.
  4. The activity is found in the custom category of the Activities panel.

📘

Note:

Libraries are forward compatible, which means that they can only be used with projects created with Studio v2018.3 and later. Libraries cannot be published to Orchestrator versions prior to 2018.3.

Please note that in a library project, when using Import Workflows to add a workflow that contains a library, the dependencies referenced in the library are not imported.

When importing two versions of the same custom library to a project in Studio, the extra custom activities contained only in the second library are not visible in the Activities panel unless you remove the first imported library.

Updated 2 years ago


About Libraries


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.