UiPath Documentation
uipath-cli
latest
false
Guia do usuário da UiPath CLI
Importante :
Este conteúdo foi traduzido com auxílio de tradução automática. A localização de um conteúdo recém-publicado pode levar de 1 a 2 semanas para ficar disponível.

init de fluxo do uip Maestro

Sintaxe e opções para o "uip Maestro flow init", que estrutura um novo projeto de fluxo com um manifesto mínimo e arquivo ".flow" de início.

uip maestro flow init estrutura um novo diretório de projeto de fluxo com um manifesto mínimo e um arquivo inicial .flow contendo um único nó de disparo manual.

Resumo​

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]]

Recebe opções globais. Os códigos de saída seguem o contrato padrão.

Argumentos​

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

Opções​

  • --force inicializar mesmo que o diretório de destino exista e não esteja vazio. Os arquivos existentes não são limpos — os arquivos são escritos ao lado; isso é útil para reinicializar dentro de uma pasta pré-criada.
  • --skip-solution-registration — não registre automaticamente este projeto na solução ao redor (consulte Comportamento abaixo).
  • --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.

Comportamento​

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 — Fluxo JSON de semente contendo:
    • Um nó inicial core.trigger.manual conectado a um entryPointIdgerado
    • A definição de nó correspondente em definitions[]
    • Vazio como edges, bindings, variables
    • Posição layout.nodes.start da tela

Registro automático da solução. A menos que --skip-solution-registration seja passado:

  • Se o diretório atual já estiver dentro de uma solução, <name>/ será criado lá e registrado como um projeto no manifesto .uipx dessa solução.
  • Se o diretório atual não estiver dentro de uma solução, uma solução pai chamada <name>Solution será estruturada automaticamente — o projeto de fluxo terminará aninhado em <name>Solution/<name>/, não em <name>/ no diretório atual, como uma leitura literal da síntese pode sugerir .

Se <name> já existir e não estiver vazio e --force não estiver definido, o comando falhará com um erro solicitando que o usuário passe --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.

Exemplos​

# 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

Formato dos dados (--output 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.

Na falha, Code está ausente e a resposta traz Result: "Failure", Message e Instructions.

Veja também​

Esta página foi útil?

Conectar

Precisa de ajuda? Suporte(opens in new window)

Quer aprender? Academia UiPath(opens in new window)

Tem perguntas? Fórum do UiPath(opens in new window)

Fique por dentro das novidades