- Overview
- Custom activities
- Migrating Activities to .NET 6
- Release Notes
- Building Workflow Analyzer Rules
- Building Activities Project Settings
- Creating Custom Wizards
- Prioritize Activities by Scope
- UiPath.Activities.Api.Base
- UiPath.Studio.Activities.Api
- UiPath.Studio.Activities.Api.Activities
- UiPath.Studio.Activities.Api.BusyService
- UiPath.Studio.Activities.Api.ExpressionEditor
- UiPath.Studio.Activities.Api.Expressions
- UiPath.Studio.Activities.Api.Licensing
- UiPath.Studio.Activities.Api.Mocking
- UiPath.Studio.Activities.Api.ObjectLibrary
- UiPath.Studio.Activities.Api.PackageBindings
- UiPath.Studio.Activities.Api.ProjectProperties
- UiPath.Studio.Activities.Api.ScopedActivities
- UiPath.Studio.Activities.Api.Settings
- UiPath.Studio.Activities.Api.Wizards
- UiPath.Studio.Activities.Api.Workflow
- UiPath.Studio.Api.Controls
- UiPath.Studio.Api.Telemetry
- UiPath.Studio.Api.Theme
- Robot JavaScript SDK
- Triggers SDK
Using The Activity Creator
Activities are the building blocks of process automation. Each contains an atomic action which, stacked together with other activities, composes a workflow.
UiPath Studio includes a number of prebuilt activities that you can install through the Package Manager.
Additionally, you can create your own custom activities specific to your needs using UiPath's Activity Creator extension for Visual Studio. The steps below will give you the foundation to build custom activities in 5 minutes flat. In this section, we'll create an activity package and in the next, populate it with functional activities.
- Visual Studio Community/Professional/Enterprise 2022 with the .NET desktop development workload installed
- UiPath's Marketplace Feed (https://gallery.uipath.com/api/v3/index.json) as a package source in Visual Studio. See here for instructions on adding package sources.
- .NET 6
- UiPath Studio
Note that version 4.0 of the Activity Creator only works with Visual Studio 2022. Likewise, the activities produced target .NET 6 Windows projects. To create activities compatible with older versions of Visual Studio or .NET, please use version 3 of the extension.
Also, the activities created by this extension rely on UiPath-made libraries currently available on the Marketplace feed (https://gallery.uipath.com/api/v3/index.json). This feed must be available in Visual Studio during development or the activities will not build successfully.
Open Visual Studio and click Extensions > Manage Extensions.
Ctrl+E
) for UiPath. Download the UiPath Activity Creator extension.
Close Visual Studio and, once the VSIX Installer appears, complete the installation.
Reopen Visual Studio and double-click Create a new project on the home screen.
On the Create a new project screen, type "uipath" in the search bar, select UiPath Standard Activity Project, and click Next.
<Your company's name>.<Your product's name>
(e.g. UiPath.Orchestrator). Then click Create.
Navigate to the Solution Explorer and notice that 3 projects, a Shared folder, and many files have now been added to solution. This is the foundation of every activity package.The Simple Activity to add your first activity.
Now that you have your package created, let's add an activity to it! In this example, you will create the activity shown above: a simple one that adds two numbers together.
Start by opening the Visual Studio solution created in the previous section and select any of the main projects (these are the ones labeled MyCompany.MyProduct...) in the Solution Explorer. Then navigate to Extensions > UiPath > Add Activities in the toolbar. Note that this menu will be disabled until one of the projects is selected.
This will open a new Activity Creator window. The first screen gives you two options:
- Create: Build one or more activities from scratch.
- Import: Import a list of predefined activities that have been saved in a standard format.
For now, select Create.
Click the Add button and fill in each field as shown below. This will prepare the creator to build an activity named Addition. When ready, click the Edit button to add properties to the Addition activity.
This will open a new Define Properties window. Use the Add button to create 3 properties as shown below.
Ensure that the first two are inputs and the last is an output. These properties will represent two numbers and their sum.
Click OK on the Properties window and Finish on the activities window. You will then see some new files added to your projects.
Protected Methods
region within it to reveal the activity's ExecuteAsync
method. This is the method that gets called whenever the activity is run in UiPath Studio.
Notice that the two inputs created in step 4 (First Number and Second Number) as well as the one output (Sum) have already been added to this method. The final step is to bridge the gap between them by replacing the comment block with code that adds the two inputs and then sets the result to Sum. See below:
Within the Solution Explorer, right-click your Design project and select Publish. This option builds your projects, packages them together, and sends the package wherever you'd like.
In the next screen, enter the folder in which you'd like to save your activity package. It's a good idea to choose one of your package sources from UiPath Studio (you can find these at Settings > Manage Sources on the Studio homepage) so you can publish directly from Visual Studio into UiPath Studio.
Click Create Profile to continue.
On the next page, rename your package source to UiPath Packages (or whatever you'd like) and change the configuration to Debug. Then click Publish.
For more info on Debug vs Release configurations, see Package Metadata.
Your output will then show that all three projects have been built successfully and the resultant package published. You now have a working activity package!
Looking at the activity package built in this tutorial, you'll see several placeholders where information such as the author, license, icon, etc. should go. Let's personalize the package by replacing those placeholders with real information.
The focus of this section will be on the Design project, which holds all your package info.
Open the MyCompany.MyProduct.Activities.Design project by double-clicking it and notice that there are three labeled sections:
- Package Metadata
- Package Versions
- Package Icon
Package Metadata
Field |
Description |
---|---|
PackageLicenseExpression |
An SPDX identifier for the license you'd like to use. The default is Apache 2.0. |
Description |
A short description of your activities that will appear in the UiPath Studio Package Manager. |
Authors and Company |
The author and owner of the package respectively. |
Copyright |
The standard copyright notice. |
PackageTags |
A list of terms for which users can search to find your package. |
PackageProjectUrl |
A link to your activities' documentation or company homepage. |
PackageIconUrl |
A link to an image file used as the package icon. Note that the
PackageIcon tag is currently unsupported in UiPath Studio.
|
<PropertyGroup>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<Description>A package used to perform simple arithmetic operations in UiPath Studio.</Description>
<Authors>My Company</Authors>
<Company>My Company</Company>
<Copyright>@ 2020 My Company</Copyright>
<PackageTags>UiPath Activity MyCompany MyProduct Math Addition Arithmetic</PackageTags>
<PackageProjectUrl>https://docs.uipath.com/integrations/docs/how-to-create-activities</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/NuGet/Samples/master/PackageIconNuspecExample/icon.png</PackageIconUrl>
...
</PropertyGroup>
<PropertyGroup>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<Description>A package used to perform simple arithmetic operations in UiPath Studio.</Description>
<Authors>My Company</Authors>
<Company>My Company</Company>
<Copyright>@ 2020 My Company</Copyright>
<PackageTags>UiPath Activity MyCompany MyProduct Math Addition Arithmetic</PackageTags>
<PackageProjectUrl>https://docs.uipath.com/integrations/docs/how-to-create-activities</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/NuGet/Samples/master/PackageIconNuspecExample/icon.png</PackageIconUrl>
...
</PropertyGroup>
Package Version
PackageVersion
tags here, which correspond to the two modes in which a package can be built--Debug and Release.
- Debug is useful during development. The version increments with each build so updates can be made and then immediately tested in UiPath Studio.
-
Release is used to create a final package ready for publication. Once development is through, you may set the desired version here.
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> <PackageVersion>0.2.0.$([System.DateTime]::UtcNow.ToString(MMddHmmss)) Version</PackageVersion> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)' == 'Release'"> <PackageVersion>0.2.0</PackageVersion> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> <PackageVersion>0.2.0.$([System.DateTime]::UtcNow.ToString(MMddHmmss)) Version</PackageVersion> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)' == 'Release'"> <PackageVersion>0.2.0</PackageVersion> </PropertyGroup>
Package Icon
PackageIconUrl
tag to add an icon to your activity package. In this example, a sample icon is used.
Rebuild the package and import it into UiPath Studio as in the previous section. Open the Package Manager and notice how your package now has a new icon, description, and updated metadata.
- What You'll Need
- Step 1: Add the UiPath Activity Creator Extension to Visual Studio
- Step 2: Create a UiPath Project
- The Simple Activity
- What You'll Need
- Step 1: Open the Activity Creator
- Step 2: Build an Activity
- Step 3: Define the Activity
- Step 4: Add Properties
- Step 5: Generate the Activity
- Step 6: Add Functionality
- Step 7: Build the Package
- Step 8: Use Your Activities in UiPath Studio
- Package Metadata
- What You'll Need
- Step 1: Open the Design Project
- Step 2: Rebuild the Package