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
重要 :
请注意此内容已使用机器翻译进行了部分本地化。
开发者指南
Last updated 2024年10月25日
按范围划分活动的优先级
使用 官方 订阅源 ( ) 中的 UiPath.Activities.API
https://pkgs.dev.azure.com/uipath/Public.Feeds/_packaging/UiPath-Official/nuget/v3/index.json
包,您可以将 Studio 设置为在搜索时显示与自定义活动范围匹配的活动。有关如何使用 API 的信息,请参阅Studio 活动 SDK 。
因此,当单击自定义活动中的 图标时,“命令面板”会提供适合当前范围的活动建议。
为此,请使用
IScopedActivitiesService
界面及以下方法:
SetScopedActivity
- 添加由作用域活动和适合该作用域的活动组成的活动对。SetScopedActivities
- 将适合的活动类型列表添加到指定的范作用域类型。
下方将举例说明如何在自定义活动中如何使用这些方法:
public void Initialize(object argument)
{
try
{
if (!(argument is IWorkflowDesignApi api))
{
return;
}
if (api.HasFeature(DesignFeatureKeys.ScopedActivities))
{
api.ScopedActivitiesService.SetScopedActivities(typeof(FirstScopeActivity), new List<Type>() { typeof(FirstChildActivity), typeof(SecondChildActivity) });
api.ScopedActivitiesService.SetScopedActivity(typeof(SecondScopeActivity), typeof(ThirdChildActivity));
}
}
catch (Exception ex)
{
Trace.TraceError(ex.Message);
}
}
public void Initialize(object argument)
{
try
{
if (!(argument is IWorkflowDesignApi api))
{
return;
}
if (api.HasFeature(DesignFeatureKeys.ScopedActivities))
{
api.ScopedActivitiesService.SetScopedActivities(typeof(FirstScopeActivity), new List<Type>() { typeof(FirstChildActivity), typeof(SecondChildActivity) });
api.ScopedActivitiesService.SetScopedActivity(typeof(SecondScopeActivity), typeof(ThirdChildActivity));
}
}
catch (Exception ex)
{
Trace.TraceError(ex.Message);
}
}