UiPath Documentation
uipath-cli
latest
false
UiPath CLI ユーザー ガイド
重要 :
このコンテンツは機械翻訳によって処理されています。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

uip api-workflow run

「uip api-workflow run」の構文とオプション - バンドルされたサーバーレス ワークフロー Executor を使用して、API ワークフローの JSON ファイルをローカルで実行します。

uip api-workflow run は、バンドルされているサーバーレス ワークフロー Executor を使用して、API ワークフローの JSON ファイルをローカルで実行します。入力引数は JSON として渡されます。既定では、Executor は 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"}')。
--input-file <name=path>ローカル ファイルをアップロードし、 ファイル (JobAttachment) の入力 <name>として渡します。複数のファイルに対して繰り返し可能です。サインイン セッションが必要です。
--output-dir <dir>ワークフロー出力内のすべてのファイル (JobAttachment) 参照を <dir>にダウンロードします。ダウンロードされた各参照には、 LocalPathが付与されます。サインイン セッションが必要です。
--folder-key <guid>この実行で作成される添付ファイルの Orchestrator フォルダー キーです ([ファイルから Base64]/[Base64 からファイルへ] アクティビティによってアップロードされた入力と書き込まれたファイル)。
--no-authSkip credential loading. The workflow runs in a local-only mode with no access to connectors or cloud-backed services. Refer to Local-only mode.
# 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 a single output field
uip api-workflow run ./workflow.json \
    --input-arguments '{"name":"World"}' \
    --output-filter 'greeting'

# Upload a local file as a file (JobAttachment) input, and download any file
# outputs the workflow produces
uip api-workflow run ./workflow.json \
    --input-file document=./invoice.pdf \
    --output-dir ./out
# 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 a single output field
uip api-workflow run ./workflow.json \
    --input-arguments '{"name":"World"}' \
    --output-filter 'greeting'

# Upload a local file as a file (JobAttachment) input, and download any file
# outputs the workflow produces
uip api-workflow run ./workflow.json \
    --input-file document=./invoice.pdf \
    --output-dir ./out

Local-only mode​

With --no-auth, the command refuses to run when the run needs Orchestrator blob storage:

  • --input-file is passed.
  • --output-dir is passed.
  • The workflow uses the File to Base64 or Base64 to File activities.

Each refusal returns Result: "Failure" with Instructions to run uip login and drop --no-auth.

データシェイプ(--output json)​

Data is the workflow's own output, with field names kept exactly as the workflow produces them:

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

A workflow that produces no output returns Data: { "Message": "(no output)" }.

When --output-dir is set, each file (JobAttachment) reference in the output is downloaded and gains a LocalPath:

{
  "Code": "WorkflowRun",
  "Data": {
    "encoded": {
      "ID": "6f1c0d2e-8a1b-4c3d-9e0f-123456789abc",
      "FullName": "invoice.base64",
      "MimeType": "text/plain",
      "LocalPath": "/abs/path/out/invoice.base64"
    }
  }
}
{
  "Code": "WorkflowRun",
  "Data": {
    "encoded": {
      "ID": "6f1c0d2e-8a1b-4c3d-9e0f-123456789abc",
      "FullName": "invoice.base64",
      "MimeType": "text/plain",
      "LocalPath": "/abs/path/out/invoice.base64"
    }
  }
}

Without --output-dir, the reference is returned without a local file.

A failed run exits non-zero per the standard exit codes and returns Result: "Failure" with the cause in Message and the next step in Instructions. When the workflow completed but its output files could not be downloaded, the failure also carries the workflow output in Data, so the attachment IDs are kept.

参照​

このページは役に立ちましたか?

接続

ヘルプ リソース サポート(opens in new window)

学習する UiPath アカデミー(opens in new window)

質問する UiPath フォーラム(opens in new window)

最新情報を取得