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 Custom Workflow Analyzer rules by adding descriptions, parameters, and integrating them in Studio's Workflow Analyzer Settings window.

- Building your own 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.

- カスタム ウィザードを作成し、Studio のリボンに組み込みます。

重要
カスタム プロジェクトでは開発依存関係として UiPath.Activities.API SDK パッケージを使用する必要があります。開発依存関係についてご覧ください。
API の使用法
When the activities are loaded into Studio, a reference to IWorkflowDesignApi
is provided in several ways:
IRegisterMetadata
の実装にpublic void Initialize(object api)
メソッドを追加します。このメソッドはアクティビティの読み込みプロセスで呼び出され、読み込まれたアクティビティは後で使用するためapi
パラメーターを保存します。- Define a class that implements
IRegisterWorkflowDesignApi
. The methodIRegisterWorkflowDesignApi.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. api
オブジェクトへの参照を、context.Services.GetService<IWorkflowDesignApi>()
を呼び出すことで取得します。ここで、context
は、通常アクティビティの設計者がアクセス可能な System.Activities.Presentation.EditingContext です。
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 list of feature keys.
フィーチャーをチェックするには、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
}
Interfaces
The following interfaces are available:
3 か月前に更新