UiPath Documentation
uipath-cli
latest
false
Guide de l'utilisateur de UiPath CLI
Important :
Ce contenu a été traduit à l'aide d'une traduction automatique. La localisation du contenu nouvellement publié peut prendre 1 à 2 semaines avant d’être disponible.

exécution du workflow d’API uip

Syntaxe et options de `uip api-workflow run`, qui exécute un fichier JSON de workflow d'API localement à l'aide de l'exécuteur de workflow sans serveur fourni.

uip api-workflow run exécute un fichier JSON de workflow d'API localement à l'aide de l'exécuteur de workflow sans serveur fourni. Les arguments d’entrée sont transmis au format JSON. Par défaut, l'exécuteur charge les informations d'identification UiPath à partir de la session uip login afin que le workflow puisse atteindre les connecteurs et les services basés sur le cloud; transmettez --no-auth pour ignorer le chargement des informations d’identification et exécuter en mode local uniquement.

Synthèse​

uip api-workflow run <file> [options]
uip api-workflow run <file> [options]
  • <file> : le chemin d'accès au fichier JSON du workflow.

Options​

DrapeauDescription
-i, --input-arguments <json>Arguments d'entrée sous la forme d'une chaîne JSON, par exemple '{"name": "World"}'.
--input-file <name=path>Chargez un fichier local et transmettez-le comme entrée de fichier (JobAttachment) <name>. Répétable pour plusieurs fichiers. Nécessite une session connectée.
--output-dir <dir>Téléchargez chaque référence de fichier (JobAttachment) dans la sortie du workflow dans <dir>; chaque référence téléchargée obtient un LocalPath. Nécessite une session connectée.
--folder-key <guid>Clé de dossier Orchestrator pour les pièces jointes créées par cette exécution (entrées et fichiers téléchargés et écrits par les activités Fichier vers Base64 / Base64 vers Fichier).
--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.

Exemples​

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

Format des données (--sortie 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.

Voir également​

Cette page vous a-t-elle été utile ?

Connecter

Besoin d'aide ? Assistance(opens in new window)

Vous souhaitez apprendre ? UiPath Academy(opens in new window)

Vous avez des questions ? UiPath Forum(opens in new window)

Rester à jour