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.

Initialisation du flux uip maestro

Syntaxe et options pour `uip maestro flow init`, qui élaborationt un nouveau projet Flow avec un manifeste et un fichier de démarrage `.flow` minimaux.

uip maestro flow init élabore un nouveau répertoire de projet Flow avec un manifeste minimal et un fichier .flow de démarrage contenant un seul nœud de déclencheur manuel.

Synthèse​

uip maestro flow init <name> [--force] [--skip-solution-registration] [--automate] [--sdk-source [file]]
uip maestro flow init <name> [--force] [--skip-solution-registration] [--automate] [--sdk-source [file]]

Les options globales sont respectées. Les codes de sortie suivent le contrat standard.

Arguments​

  • <name> (required) — project folder name. Allowed characters: letters, numbers, underscores (_), and hyphens (-).

Options​

  • --force — initialise même si le répertoire cible existe et n'est pas vide. Les fichiers existants ne sont pas effacés - les fichiers sont écrits avec; Cela est utile pour la réinitialisation dans un dossier pré-créé.
  • --skip-solution-registration — n'enregistrez pas automatiquement ce projet dans la solution voisine (voir Comportement ci-dessous).
  • --automate — create a Maestro Automate project. The project and the commands that operate on it are the same as for a standard Flow project; only the runtime profile written into operate.json differs.
  • --sdk-source [file] — also write the builder-SDK source for the new project: decompile the starter .flow file into <project>/.flow-sdk/<name>.flow.ts, or into [file] (relative to the current directory), creating its folder. The result is the same as running uip maestro flow decompile <name>.flow -o <file> --no-pipeline after init. Requires @uipath/maestro-builder-sdk 6.11.1 or later, installed in the project or globally. If [file] already exists, the command fails unless you pass --force.

Comportement​

The command writes these files into <name>/:

  • project.uiproj — { "Name": "<name>", "ProjectType": "Flow" }
  • operate.json — the project's runtime settings, including the runtime profile that --automate selects
  • <name>.flow — référencer le flux JSON contenant:
    • Un core.trigger.manual nœud de démarrage connecté à un entryPointIdgénéré
    • La définition du nœud correspondant dans definitions[]
    • Vide edges, bindings, variables
    • Position layout.nodes.start de la zone de dessin

Enregistrement automatique de la solution. Hormis si --skip-solution-registration est défini:

  • Si le répertoire actuel se trouve déjà à l'intérieur d'une solution, le fichier <name>/ y est créé et enregistré en tant que projet dans le manifeste .uipx de cette solution.
  • Si le répertoire actuel ne se trouve pas à l'intérieur d'une solution, une solution parente nommée <name>Solution est exécutée automatiquement — le projet Flow se retrouve imbriqué à <name>Solution/<name>/, et non à <name>/ dans le répertoire actuel, comme une lecture littérale de la synthèse pourrait suggérer .

Si <name> existe déjà et n’est pas vide et que --force n’est pas défini, la commande échoue en présentant une erreur invitant l’utilisateur à transmettre --force

With --sdk-source, the command checks for @uipath/maestro-builder-sdk before it creates anything. If the project is created but writing the SDK source fails, the error names the uip maestro flow decompile command that writes the source for the existing project.

Exemples​

# Create a new project in ./invoice-flow
uip maestro flow init invoice-flow

# Reinitialize into an existing non-empty folder (e.g. a Git repo)
uip maestro flow init invoice-flow --force

# Create a Maestro Automate project
uip maestro flow init my-automate --automate

# Create a project inside an existing solution and write its builder-SDK source
cd MySolution && uip maestro flow init my-flow --sdk-source
# Create a new project in ./invoice-flow
uip maestro flow init invoice-flow

# Reinitialize into an existing non-empty folder (e.g. a Git repo)
uip maestro flow init invoice-flow --force

# Create a Maestro Automate project
uip maestro flow init my-automate --automate

# Create a project inside an existing solution and write its builder-SDK source
cd MySolution && uip maestro flow init my-flow --sdk-source

Format des données (--sortie json)​

{
  "Code": "FlowInit",
  "Data": {
    "Status": "Created successfully",
    "Path": "/workspace/my-flow-projectSolution/my-flow-project",
    "SolutionRegistration": {
      "Status": "Registered",
      "Message": "Project registered in parent solution.",
      "Solution": "/workspace/my-flow-projectSolution/my-flow-projectSolution.uipx",
      "Project": "my-flow-project/project.uiproj",
      "ProjectId": "00000000-0000-0000-0000-000000000000",
      "Instructions": "The project is listed in the parent solution manifest.
Packing or uploading the solution will sync solution resources automatically."
    },
    "AutoCreatedSolution": {
      "Name": "my-flow-projectSolution",
      "Path": "/workspace/my-flow-projectSolution",
      "SolutionFile": "/workspace/my-flow-projectSolution/my-flow-projectSolution.uipx"
    },
    "ProjectArtifacts": { "Created": true },
    "NextSteps": "The project is listed in the parent solution manifest.
Packing or uploading the solution will sync solution resources automatically."
  }
}
{
  "Code": "FlowInit",
  "Data": {
    "Status": "Created successfully",
    "Path": "/workspace/my-flow-projectSolution/my-flow-project",
    "SolutionRegistration": {
      "Status": "Registered",
      "Message": "Project registered in parent solution.",
      "Solution": "/workspace/my-flow-projectSolution/my-flow-projectSolution.uipx",
      "Project": "my-flow-project/project.uiproj",
      "ProjectId": "00000000-0000-0000-0000-000000000000",
      "Instructions": "The project is listed in the parent solution manifest.
Packing or uploading the solution will sync solution resources automatically."
    },
    "AutoCreatedSolution": {
      "Name": "my-flow-projectSolution",
      "Path": "/workspace/my-flow-projectSolution",
      "SolutionFile": "/workspace/my-flow-projectSolution/my-flow-projectSolution.uipx"
    },
    "ProjectArtifacts": { "Created": true },
    "NextSteps": "The project is listed in the parent solution manifest.
Packing or uploading the solution will sync solution resources automatically."
  }
}

AutoCreatedSolution is present only when a parent solution was scaffolded automatically (i.e. the command wasn't run inside an existing solution). SolutionRegistration is always present; with --skip-solution-registration, its Status is OptedOut. SdkSource (the path of the written builder-SDK source) is present only with --sdk-source.

En cas d'échec, Code est absent et la réponse comporte Result: "Failure", Message et Instructions.

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