UiPath Documentation
uipath-cli
latest
false
Guía del usuario de UiPath CLI
Importante :
Este contenido se ha traducido mediante traducción automática. La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.

ejecución de flujo de trabajo de API de UIP

Sintaxis y opciones para `uip api-workflow run`, que ejecuta un archivo JSON de flujo de trabajo de API localmente utilizando el ejecutor de flujo de trabajo sin servidor incluido.

uip api-workflow run un archivo JSON de flujo de trabajo de API localmente utilizando el ejecutor de flujo de trabajo sin servidor incluido. Los argumentos de entrada se pasan como JSON. De forma predeterminada, el ejecutor carga las credenciales de UiPath desde la sesión uip login para que el flujo de trabajo pueda llegar a los conectores y servicios respaldados en la nube; introduce --no-auth para omitir la carga de credenciales y ejecutar en modo solo local.

Sinopsis​

uip api-workflow run <file> [options]
uip api-workflow run <file> [options]
  • <file> : ruta al archivo JSON del flujo de trabajo.

Opciones​

MarcaDescripción
-i, --input-arguments <json>Argumentos de entrada como una cadena JSON, por ejemplo '{"name": "World"}'.
--input-file <name=path>Carga un archivo local y pásalo como entrada del archivo (JobAttachment) <name>. Repetible para varios archivos. Necesita una sesión iniciada.
--output-dir <dir>Descarga cada referencia de archivo (JobAttachment) en la salida del flujo de trabajo en <dir>; cada referencia descargada obtiene un LocalPath. Necesita una sesión iniciada.
--folder-key <guid>Clave de carpeta de Orchestrator para los archivos adjuntos que crea esta ejecución (entradas cargadas y archivos escritos por las actividades Archivo a Base64 / Base64 a archivo).
--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.

Ejemplos​

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

Forma de datos (--json de salida)​

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.

Ver también​

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte(opens in new window)

¿Quiere aprender? UiPath Academy(opens in new window)

¿Tiene alguna pregunta? Foro de UiPath(opens in new window)

Manténgase actualizado