通知を受け取る

UiPath の開発者

The UiPath Developer Guide

アクティビティ 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:

📘

重要

カスタム プロジェクトでは開発依存関係として UiPath.Activities.API SDK パッケージを使用する必要があります。開発依存関係について参照してください。

API の使用法

アクティビティが Studio に読み込まれると、IWorkflowDesignApi は次のようないくつかの方法で参照できます。

  1. IRegisterMetadata の実装に public void Initialize(object api) メソッドを追加します。このメソッドはアクティビティの読み込みプロセスで呼び出され、読み込まれたアクティビティは後で使用するため api パラメーターを保存します。
  2. IRegisterWorkflowDesignApi を実装するクラスを定義します。IRegisterWorkflowDesignApi.Initialize(IWorkflowDesignApi api) メソッドはアクティビティの読み込みプロセスで呼び出され、読み込まれたアクティビティは後で使用するため api パラメーターを保存します。このメソッドを使用する場合、Studio の 2019.6 以降のバージョンでしかパッケージを読み込むことができません。
  3. api オブジェクトへの参照を、context.Services.GetService<IWorkflowDesignApi>() を呼び出すことで取得します。ここで、context は、通常アクティビティの設計者がアクセス可能な System.Activities.Presentation.EditingContext です。

Design Feature Keys

必要な機能キーがサポートされているかどうかを調べるために、DesignFeatureKeys に対して予備チェックを実行することが重要です。

フィーチャーをチェックするには、IWorkflowDesignApi の参照に対して HasFeature メソッドを呼び出す必要があります。これを行わないと、Studio のより古いバージョンでは、関連する API メソッドの呼び出しが MissingMemberException または MissingMethodException で失敗する可能性があります。

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.

10 か月前に更新


アクティビティ SDK について


改善の提案は、API リファレンスのページでは制限されています

改善を提案できるのは Markdown の本文コンテンツのみであり、API 仕様に行うことはできません。