UiPath Developer

The UiPath Developer Guide

About the Activities SDK

The UiPath.Activities.API SDK package is hosted on the Official activities feed (https://www.myget.org/F/workflow).

Among others, the package is used for:

📘

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.

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
           }

List of Feature Keys

Feature Key

Version

AccessProvider

Studio 2019.8 and up.

InstallExtensions

Studio 2020.4 and up.

LibraryService

Studio 2020.4-beta and up.

LibraryServiceV2

Studio 2020.4 and up.

ProjectProperties

Studio 2020.2 and up.

ScopedActivities

Studio 2020.2 and up.

Settings

Studio 2019.8 and up.

SettingsV2

Studio 2020.4 and up.

Telemetry

Studio 2019.10 and up.

Theme

Studio 2019.8 and up.

Wizards

Studio 2019.8 and up.

WizardsV2

Studio 2020.2 and up.

WizardsV3

Studio 2020.3 and up.

WorkflowAnalyzer

Studio 2019.10 and up.

WorkflowAnalyzerV2

Studio 2019.10.2 and up.

WorkflowAnalyzerV3

Studio 2019.10.3 and up.

WorkflowAnalyzerV4

Studio 2020.2 and up.

Interfaces

IExtensionsInstallerService Interface

Methods

void InstallExtension(string extensionName)
Member of UiPath.Studio.Activities.Api.IExtensionsInstallerService

IRegisterAnalyzerConfiguration Interface

Component called by the analyzer application in each rule assembly, in order to configure the host analyzer.

Methods

void Initialize(UiPath.Studio.Activities.Api.Analyzer.IAnalyzerConfigurationService workflowAnalyzerConfigService)
Member of UiPath.Studio.Activities.Api.IRegisterAnalyzerConfiguration

Summary:
Offers an injection point to the implementing assembly in order to access UiPath.Studio.Activities.Api.Analyzer.IAnalyzerConfigurationService capabilities.

Parameters:
workflowAnalyzerConfigService: The analyzer interface.

IRegisterWorkflowDesignApi Interface

Workflow designer API registration. It follows the same pattern as IRegisterMetadata. Studio scans the types in your assembly for implementations of this interface.

If an implementation is found, an instance is created by Studio and the API instance is handed through UiPath.Studio.Activities.Api.IRegisterWorkflowDesignApi.Initialize(UiPath.Studio.Activities.Api.IWorkflowDesignApi).

Note that older Studio versions that do not ship with the API are not able to load your assembly. If you want to keep the compatibility with the older Studio versions, instead of implementing this interface, add an Initialize(object) method on the implementation of IRegisterMetadata, that Studio will discover through reflection. Cast the object parameter to UiPath.Studio.Activities.Api.IWorkflowDesignApi on your side. The same UiPath.Studio.Activities.Api.IWorkflowDesignApi instance may be retrieved from the designer context through GetService.

Methods

void Initialize(UiPath.Studio.Activities.Api.IWorkflowDesignApi api)
Member of UiPath.Studio.Activities.Api.IRegisterWorkflowDesignApi

Summary:
Register the API instance

IWorkflowDesignApi Interface

Offers capabilities to query runtime support of a feature.

Properties

Summary

AccessProvider { get; }

Part of IAccessProvider interface, runtime service exposes a method for obtaining OAuth 2.0 access tokens.

ExtensionsInstallerService { get; }

Part of public interface IExtensionsInstallerService.

ProjectPropertiesService { get; }

Part of IProjectPropertiesService, the entry point for expression language-related functionality.

Requires feature ProjectPropertiesV1.

ScopedActivitiesService { get; }

Part of IScopedActivitiesService, which exposes the functionality of adding scope activity types with their suggested activity types.

Requires feature ScopedActivitiesV1

Settings { get; }

Part of IActivitiesSettingsService interface, the entry point for settings related functionality.

Telemetry { get; }

Part of ITelemetryService, the telemetry service.

Theme { get; }

Part of IThemeService, the entry point for theme-related functionality.

Wizards { get; }

Part of IWizardsService, interface for adding wizards to Studio.

WorkflowAnalyzerConfigService { get; }

Part of IAnalyzerConfigurationService, which represents components that configure the Workflow Analyzer.

Updated 2 months ago



About the Activities SDK


Suggested Edits are limited on API Reference Pages

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