UiPath Documentation
activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

工作流活动

上次更新日期 2026年4月27日

获取资产

使用提供的“资产名称” 获取指定的 Orchestrator 资产 。如果资产不是全局资产,则必须将其分配给本地机器人才能检索。该活动使用与其运行的机器人相同的身份验证上下文。有关全局资产的更多信息,您可以访问关于资产

定义

命名空间: UiPath.Activities.System.API

程序集: UiPath.System.Activities.Api(在 UiPath.System.Activities.Api.dll 中)

重载

GetAsset(String)Gets a specified asset by using a provided AssetName. If the asset is not global, it must be assigned to the local robot in order to be retrieved.
GetAsset(String, String)使用提供的资产名称获取指定资产 。如果资产不是全局资产,则必须将其分配给本地机器人,才能在指定的文件夹路径中检索它。
GetAsset(String, String, CacheStrategyEnum, Int32)使用提供的资产名称获取指定资产 。如果资产不是全局资产,则必须将其分配给本地机器人才能检索,以及其他配置。

GetAsset(String)

Gets a specified asset by using a provided AssetName. If the asset is not global, it must be assigned to the local robot in order to be retrieved.

Object GetAsset(
    string assetName
)
Object GetAsset(
    string assetName
)

assetName String : 要检索的资产的名称。

GetAsset(String, String)

使用提供的资产名称获取指定资产。 如果资产不是全局资产,则必须将其分配给本地机器人,以便在指定的文件夹路径中进行检索。

Object GetAsset(
    string assetName,
    string folderPath
)
Object GetAsset(
    string assetName,
    string folderPath
)

assetName String : 要检索的资产的名称。

folderPath String : 如果资产所在的文件夹路径与运行流程的文件夹不同,则必须从中检索资产。

GetAsset(String, String, CacheStrategyEnum, Int32)

使用提供的资产名称获取指定资产。 如果资产不是全局资产,则必须将其与其他配置一起分配给本地机器人,以便进行检索。

Object GetAsset(
    string assetName,
    string folderPath,
    CacheStrategyEnum cacheStrategy,
    int timeoutMS
)
Object GetAsset(
    string assetName,
    string folderPath,
    CacheStrategyEnum cacheStrategy,
    int timeoutMS
)

assetName String : 要检索的资产的名称。

folderPath String : 如果资产所在的文件夹路径与运行流程的文件夹不同,则必须从中检索资产。

cacheStrategy CacheStrategyEnum :系统将缓存在选定期间检索到的值。默认情况下,系统会将所有请求转发到 Orchestrator。

timeoutMS Int32 :指定等待时间(以毫秒为单位),如果超出该时间后活动并未运行,系统便会抛出错误。默认值为 30000 毫秒(30 秒)。

返回值

检索到的资产。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新