订阅

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

When the activities are loaded into Studio, a reference to IWorkflowDesignApi is provided in several ways:

  1. IRegisterMetadata 实施内部,添加 public void Initialize(object api) 方法。在活动加载过程中,系统将调用此方法,并且活动可以存储 api 参数供以后使用。
  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. 通过调用 context.Services.GetService<IWorkflowDesignApi>() 引用 api 对象,其中 contextSystem.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.

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
           }

Interfaces

The following interfaces are available:

3个月前更新


关于活动 SDK


建议的编辑仅限用于 API 参考页面

您只能建议对 Markdown 正文内容进行编辑,而不能建议对 API 规范进行编辑。