sdk
latest
false
- 概述
- 自定义活动
- 将活动迁移到 .NET 6
- 发行说明
- 构建工作流分析器规则
- 构建活动项目设置
- 创建自定义向导
- 按范围划分活动的优先级
- 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
- 触发器 SDK
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。

开发者指南
上次更新日期 2024年10月25日
UiPath Activities.API SDK 包托管在 官方 活动订阅源 (
https://pkgs.dev.azure.com/uipath/Public.Feeds/_packaging/UiPath-Official/nuget/v3/index.json
) 上。
其中,该包用于:
-
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.
重要提示: UiPath Activities.API SDK 包必须用作自定义项目中的开发依赖项。 阅读有关 开发依赖项的更多信息。
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 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. - 通过调用
context.Services.GetService<IWorkflowDesignApi>()
获取api
对象的引用,其中context
是 System.Activities.Presentation.EditingContext,通常可供活动设计者访问。
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.
为了检查功能,您需要在
IWorkflowDesignApi
引用上调用 HasFeature
方法,否则在较旧的 Studio 版本上,对相关 API 方法的调用可能会失败,并显示“ 缺少成员异常 ”或“ 缺少 方法异常”。
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
}