UiPath Documentation
uipath-cli
latest
false
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

UiPath CLI 用户指南

uip api 工作流运行

uip api-workflow run使用捆绑的 Serverless 工作流执行程序在本地执行 API 工作流 JSON 文件。输入参数以 JSON 形式传递。默认情况下,执行程序从uip login会话加载 UiPath 凭据,以便工作流可以访问连接器和云支持的服务;传递--no-auth以跳过凭据加载并以仅本地模式运行。

大纲

uip api-workflow run <file> [options]
uip api-workflow run <file> [options]
  • <file> — 工作流 JSON 文件的路径。

选项

标记描述
-i, --input-arguments <json>以 JSON 字符串形式运行的输入参数,例如'{"name": "World"}'
--no-auth跳过凭据加载。工作流在仅本地模式下运行,无法访问连接器或云支持的服务。

示例

# Run with an inline input object
uip api-workflow run ./workflow.json \
    --input-arguments '{"name":"World"}'

# Run without loading credentials (offline / local-only)
uip api-workflow run ./workflow.json --no-auth

# Extract just the output payload
uip api-workflow run ./workflow.json \
    --input-arguments '{"name":"World"}' \
    --output-filter 'Data.Output'
# Run with an inline input object
uip api-workflow run ./workflow.json \
    --input-arguments '{"name":"World"}'

# Run without loading credentials (offline / local-only)
uip api-workflow run ./workflow.json --no-auth

# Extract just the output payload
uip api-workflow run ./workflow.json \
    --input-arguments '{"name":"World"}' \
    --output-filter 'Data.Output'

数据形状(--输出 json)

{
  "Code": "WorkflowRun",
  "Data": {
    "Status": "Completed",
    "Output": {
      "greeting": "Hello, World!"
    }
  }
}
{
  "Code": "WorkflowRun",
  "Data": {
    "Status": "Completed",
    "Output": {
      "greeting": "Hello, World!"
    }
  }
}

Status反映执行程序的终止状态( CompletedFaulted等)。根据标准退出代码,发生故障的运行会以非零退出。

另请参阅

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新