UiPath Documentation
uipath-cli
latest
false
UiPath CLI ユーザー ガイド
重要 :
このコンテンツは機械翻訳によって処理されています。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

UIP Maestro フローの初期化

「uip maestro flow init」の構文とオプション。最小限のマニフェストとスターターの「.flow」ファイルを使用して新しいフロー プロジェクトを構成します。

uip maestro flow init は、最小限のマニフェストと、単一の手動トリガーノードを含むスターター .flow ファイルを含む新しいFlowプロジェクトディレクトリをスキャフォールディングします。

概要​

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

グローバルオプションを優先します。終了コードは 標準コントラクトに従います。

引数​

  • <name> (必須) — プロジェクトのフォルダー名です。使用できる文字は、文字、数字、アンダースコア (_)、ハイフン (-です)。

オプション​

  • --force — ターゲットディレクトリが存在し、空でない場合でも初期化します。既存のファイルはクリア されず 、ファイルは並行して書き込まれます。これは、事前に作成されたフォルダー内で再初期化する場合に便利です。
  • --skip-solution-registration — このプロジェクトを周囲のソリューションに自動登録しないでください (以下の「動作」を参照)。
  • --automate — Maestro Automate プロジェクトを作成します。プロジェクトとそれを操作するコマンドは、標準のフロープロジェクトの場合と同じです。 operate.json に書き込まれるランタイム プロファイルのみが異なります。
  • --sdk-source [file] — 新しいプロジェクトの builder-SDK ソースも記述します。スターター .flow ファイルを <project>/.flow-sdk/<name>.flow.tsまたは [file] (現在のディレクトリを基準にした相対位置) に逆コンパイルして、そのフォルダーを作成します。結果は、 をinitした後に uip maestro flow decompile <name>.flow -o <file> --no-pipeline を実行する場合と同じです。@uipath/maestro-builder-sdk 6.11.1 以降が必要です。プロジェクトにインストールされているか、グローバルにインストールされている必要があります。[file]既に存在する場合、 を渡さない限り、コマンドは失敗--force。

動作​

コマンドは、これらのファイルを に書き込みます<name>/

  • project.uiproj — { "Name": "<name>", "ProjectType": "Flow" }
  • operate.json — プロジェクトのランタイム設定 ( --automate が選択するランタイム プロファイルを含む)
  • <name>.flow — 以下を含むシードフロー JSON
    • 生成されたentryPointIdに配線された 1 つのcore.trigger.manual開始ノード
    • definitions[] の一致するノードの定義
    • 空の edges、 bindings、 variables
    • キャンバス layout.nodes.start 位置

ソリューションの自動登録。--skip-solution-registrationが合格しない限り:

  • 現在のディレクトリが既にソリューション内にある場合は、 <name>/ がそこに作成され、そのソリューションの .uipx マニフェストにプロジェクトとして登録されます。
  • 現在のディレクトリがソリューション内にない場合、<name>Solution という名前の親ソリューションが自動的にスキャフォールディングされます — フロー プロジェクトは、概要を文字どおりに読むと示唆されるように、現在のディレクトリの <name>/ ではなく、最終的に <name>Solution/<name>/にネストされます。

<name>既に存在し、空ではなく、--forceが設定されていない場合、コマンドは失敗し、ユーザーに--forceを渡すよう求めるエラーが表示されます。

--sdk-sourceでは、コマンドは何かを作成する前に@uipath/maestro-builder-sdkを確認します。プロジェクトを作成しても SDK ソースの書き込みに失敗した場合、エラーは、既存のプロジェクトのソースを書き込む uip maestro flow decompile コマンドに名前を付けます。

# 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

データシェイプ(--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 は、親ソリューションが自動的にスキャフォールディングされた場合 (つまり、コマンドが既存のソリューション内で実行されなかった) 場合にのみ存在します。SolutionRegistration は常に存在します。 --skip-solution-registrationの場合、その Status は OptedOutになります。SdkSource (記述されたビルダー SDK ソースのパス) は、 --sdk-sourceにのみ存在します。

失敗した場合、 Code は存在せず、応答は Result: "Failure"、 Messageおよび Instructionsを運びます。

参照​

このページは役に立ちましたか?

接続

ヘルプ リソース サポート(opens in new window)

学習する UiPath アカデミー(opens in new window)

質問する UiPath フォーラム(opens in new window)

最新情報を取得