UiPath Documentation
uipath-cli
latest
false
UiPath-CLI-Benutzerhandbuch
Wichtig :
Dieser Inhalt wurde maschinell übersetzt. Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.

Ausführung des UIP-API-Workflows

Syntax und Optionen für „uip api-workflow run“, der eine API Workflow JSON-Datei lokal mithilfe des gebündelten Serverless Workflow Executor ausführt.

uip api-workflow run führt eine API Workflow-JSON-Datei lokal mithilfe des gebündelten Serverless Workflow Executor aus. Eingabeargumente werden als JSON übergeben. Standardmäßig lädt der Executor UiPath-Anmeldeinformationen aus der uip login -Sitzung, damit der Workflow Connector und Cloud-gestützte Dienste erreichen kann; Übergeben Sie --no-auth , um das Laden der Anmeldeinformationen zu überspringen und in einem reinen lokalen Modus auszuführen.

Zusammenfassung​

uip api-workflow run <file> [options]
uip api-workflow run <file> [options]
  • <file> – Der Pfad zur Workflow-JSON-Datei.

Optionen​

MarkierenBeschreibung
-i, --input-arguments <json>Geben Sie Argumente als JSON-Zeichenfolge ein, z. B. '{"name": "World"}'.
--input-file <name=path>Laden Sie eine lokale Datei hoch und übergeben Sie sie als Datei (JobAttachment) Eingabe <name>. Für mehrere Dateien wiederholbar. Erfordert eine angemeldete Sitzung.
--output-dir <dir>Jede Datei herunterladen (JobAttachment) in der Workflow-Ausgabe in <dir>; Jede heruntergeladene Referenz erhält ein LocalPath. Erfordert eine angemeldete Sitzung.
--folder-key <guid>Orchestrator-Ordnerschlüssel für die Anhänge, die diese Ausführung erstellt (hochgeladene Eingaben und Dateien, die von den Aktivitäten File to Base64/Base64 to File geschrieben wurden).
--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.

Beispiele​

# 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.

Datenform (--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.

Siehe auch​

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support(opens in new window)

Möchten Sie lernen? UiPath Academy(opens in new window)

Haben Sie Fragen? UiPath-Forum(opens in new window)

Auf dem neuesten Stand bleiben