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 the Package Manager.
A reusable component activity represents a workflow packaged as an activity, and utilized in other processes.
- Go to the Studio Backstage View > Start > Library. This opens the New Blank Library window.
- 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.
- The Project Panel displays the tree view with the Project folder, Dependencies and the
NewActivity.xamlwhich contains the actual workflow.
By default, the dependencies available for new libraries are the same as for blank new projects, namely
UiPath.UIAutomation.Activities, with the Lowest Applicable Version runtime rule.
- 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.
Due to a NuGet limitation, publishing to Windows environment paths with locations which contain subfolders restricted to the current user is not available.
- Type in the Release Notes, which can be later viewed in the Packages section in Orchestrator. Add a New Version number or leave the automatically generated one. Please note that the Release Notes field accepts a maximum of 10,000 characters. For more details about how the version number is generated, check the About Publishing Automation Projects page.
Release notes for published libraries are visible only in Orchestrator, due to a NuGet v3 limitation.
- 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. Select the check box next to the Include Sources to package all
.xamlsources within the generated assembly file, including workflows that were previously made private. This is helpful during debugging workflows.
- Select Publish. The entire project folder is archived into a
.nupkgfile, and uploaded to Orchestrator, the custom NuGet feed or saved in the local directory.
- If the project is published successfully, the Info dialog box is displayed, which contains:
- The name under which the package was published to Orchestrator, in the Packages page, 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.
The following limitations prevent library projects from being 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.
- Launch Workflow Interactive activity is not supported for libraries.
- Open or create a new project.
- Under the All Packages category, pick the feed under which the library is saved and install the package.
- Select OK and the package is added to the project definition.
- The activity is found in the custom category in the Activities panel.
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.