sdk
latest
false
UiPath logo, featuring letters U and I in white
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.

How to Use the API

When the activities are loaded into Studio, a reference to IWorkflowDesignApi is provided in several ways:

  1. Inside the IRegisterMetadata implementation add a public void Initialize(object api) method. This method is called during the activity loading process and the activity can store the api parameter for later usage.
  2. Define a class that implements IRegisterWorkflowDesignApi. The method IRegisterWorkflowDesignApi.Initialize(IWorkflowDesignApi api) is called during the activity loading process, and the activity can store the api parameter for later usage. When using this method only Studio versions from 2019.6 are able to load your package.
  3. Obtain a reference of the api object by calling context.Services.GetService<IWorkflowDesignApi>() where context is a System.Activities.Presentation.EditingContext, usually accessible for activity designers.

Design Feature Keys

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
           }
  • How to Use the API
  • Design Feature Keys
  • Interfaces

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.