sdk
latest
false
- 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
Developer Guide
Last updated Oct 25, 2024
Studio Activities SDK
The UiPath.Activities.API SDK package is hosted on the Official activities feed (
https://pkgs.dev.azure.com/uipath/Public.Feeds/_packaging/UiPath-Official/nuget/v3/index.json
).
Among others, the package is used for:
-
Building Workflow Analyzer Rules rules by adding descriptions, parameters, and integrating them in Studio's Workflow Analyzer Settings window.
-
Building Activities Project Settings by adding categories, sections, numeric input fields, combo boxes, and integrating them in the Activity Project Settings window in Studio, much like activities from UiPath packages.
-
Creating Custom Wizards and integrating them in the Studio ribbon.
Important: The UiPath.Activities.API SDK package must be used as a development dependency in your custom project. Read more about Development Dependencies.
When the activities are loaded into Studio, a reference to IWorkflowDesignApi is provided in several ways:
- Inside the
IRegisterMetadata
implementation add apublic void Initialize(object api)
method. This method is called during the activity loading process and the activity can store theapi
parameter for later usage. - Define a class that implements IRegisterWorkflowDesignApi. The method
IRegisterWorkflowDesignApi.Initialize(IWorkflowDesignApi api)
is called during the activity loading process, and the activity can store theapi
parameter for later usage. When using this method only Studio versions from 2019.6 are able to load your package. - Obtain a reference of the
api
object by callingcontext.Services.GetService<IWorkflowDesignApi>()
wherecontext
is a System.Activities.Presentation.EditingContext, usually accessible for activity designers.
It is important to perform a preliminary check against the
DesignFeatureKeys
to see if the needed feature keys are supported. For more information, see the DesignFeatureKeys.
In order to check for a feature, you need to call the
HasFeature
method on the IWorkflowDesignApi
reference, otherwise calls to the relevant api methods might fail with MissingMemberException or MissingMethodException on older Studio versions.
IWorkflowDesignApi studioActivitiesApi;
// How to check for a feature.
if (studioActivitiesApi.HasFeature(UiPath.Studio.Activities.Api.DesignFeatureKeys.Settings))
{
// Call Method or lambda that is using specific feature
// This ensures that the code is JIT compiled only after the feature check
}
IWorkflowDesignApi studioActivitiesApi;
// How to check for a feature.
if (studioActivitiesApi.HasFeature(UiPath.Studio.Activities.Api.DesignFeatureKeys.Settings))
{
// Call Method or lambda that is using specific feature
// This ensures that the code is JIT compiled only after the feature check
}
The following interfaces are available: