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

UiPath CLI ユーザー ガイド

UIP フロー ノードと UIP フロー エッジ

フローはグラフです。ノード は頂点 (トリガー、アクティビティ、コネクタ、エージェント) です。 エッジ は、それらの間の有向接続です。uip flow node コマンドと uip flow edge コマンドは、.flowファイルをその場で編集し、追加、設定、リスト表示、削除を行います。

このページでは、.flow ファイルを同じ方法で編集する 3 つのコンパニオン コマンド グループ ( variablevariable-update、および bindingについても説明します。

概要

uip flow node add       <file> <node-type> [-i <json>] [--position <x,y>] [--label <label>] [--source <uuid>]
uip flow node configure <file> <node-id> --detail <json>
uip flow node list      <file>
uip flow node delete    <file> <node-id>

uip flow edge add    <file> <source-id> <target-id> [--source-port <port>] [--target-port <port>]
uip flow edge list   <file>
uip flow edge delete <file> <edge-id>
uip flow node add       <file> <node-type> [-i <json>] [--position <x,y>] [--label <label>] [--source <uuid>]
uip flow node configure <file> <node-id> --detail <json>
uip flow node list      <file>
uip flow node delete    <file> <node-id>

uip flow edge add    <file> <source-id> <target-id> [--source-port <port>] [--target-port <port>]
uip flow edge list   <file>
uip flow edge delete <file> <edge-id>

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


uip フロー ノード追加

.flow ファイルにノードを追加します。ノードの種類はレジストリに存在する必要があります。有効な<node-type>値を検出するにはuip flow registry searchを使用します。

引数

  • <file> (必須).flow ファイルのパスです。
  • <node-type> (必須) — ノードタイプ識別子 (例:core.trigger.manualuipath.connector.slack.send-message)。

オプション

オプション説明
-i, --input <json>ノードに設定する入力値の JSON オブジェクト (例:'{"script":"…"}')。配列やスカラーではなく、JSON オブジェクトである必要があります。コネクタ ノード (タイプ uipath.connector.*) の場合は、ここで--inputさず、後でnode configureを実行してください。
--position <x,y>キャンバスの位置 (例:250,150。x と y はどちらも必須の数値です。
--label <label>ノードの表示ラベルです。
--source <uuid>インライン エージェント ノードのソース識別子 ( model.sourceに入力されます)。

uip flow node add invoice-flow.flow uipath.connector.slack.send-message --label "Notify team"
uip flow node add invoice-flow.flow uipath.connector.slack.send-message --label "Notify team"

Data shape (--output json)

{
  "Code": "NodeAddSuccess",
  "Data": {
    "Node": { "id": "node_a1b2c3d4", "type": "uipath.connector.slack.send-message" },
    "DefinitionAdded": true,
    "BindingsCreated": 0,
    "VariableCount": 0
  }
}
{
  "Code": "NodeAddSuccess",
  "Data": {
    "Node": { "id": "node_a1b2c3d4", "type": "uipath.connector.slack.send-message" },
    "DefinitionAdded": true,
    "BindingsCreated": 0,
    "VariableCount": 0
  }
}

DefinitionAddedは、特定のnode-typeの最初の挿入時にtrueされ、.flow definitions[]配列内の対応するエントリが作成されます。


uip フロー ノードの構成

既に追加されているノードに inputs.detail を設定し、必要なワークフローのバインドを作成します。コネクタ ノードと Managed HTTP ノードに対してnode add後にこれを実行します。

引数

  • <file> (必須).flow ファイルのパスです。
  • <node-id> (必須) — 設定するノードの ID です ( node listで検索します)。

オプション

  • --detail <json> (必須) — 構成 JSON。形状はノードタイプによって異なります。

コネクタ ノード (uipath.connector.*)

registry get出力のconnectorMethodInfoからmethodendpointを取得します。

  • 必須: connectionIdfolderKeymethodendpoint
  • 任意: bodyParametersqueryParameterspathParameters
uip flow node configure invoice-flow.flow node_a1b2c3d4 --detail '{
  "connectionId": "b2c3d4e5-0000-0000-0000-000000000001",
  "folderKey":    "c3d4e5f6-0000-0000-0000-000000000001",
  "method":       "POST",
  "endpoint":     "/issues",
  "bodyParameters": { "summary": "Bug" }
}'
uip flow node configure invoice-flow.flow node_a1b2c3d4 --detail '{
  "connectionId": "b2c3d4e5-0000-0000-0000-000000000001",
  "folderKey":    "c3d4e5f6-0000-0000-0000-000000000001",
  "method":       "POST",
  "endpoint":     "/issues",
  "bodyParameters": { "summary": "Bug" }
}'

マネージド HTTP ノード (core.action.http.v2)

次の 2 つの認証モード:

コネクタ モード (authentication: "connector") — 認証に Integration Service のコネクションを使用します。

  • 必須: authenticationmethodconnectionIdfolderKeytargetConnector
  • methodGETPOSTPUTPATCHDELETEOPTIONSHEAD
  • 任意: [ url (コネクタのベース URL に追加されるパス)、 headersquerybody
uip flow node configure invoice-flow.flow node_abc --detail '{
  "authentication":  "connector",
  "targetConnector": "uipath-microsoft-outlook365",
  "connectionId":    "…",
  "folderKey":       "…",
  "method":          "GET",
  "url":             "/me"
}'
uip flow node configure invoice-flow.flow node_abc --detail '{
  "authentication":  "connector",
  "targetConnector": "uipath-microsoft-outlook365",
  "connectionId":    "…",
  "folderKey":       "…",
  "method":          "GET",
  "url":             "/me"
}'

手動モード (authentication: "manual") — コネクタ認証なし、完全な URL と認証ヘッダーを自身で指定します。

  • 必須: authenticationmethodurl (完全な URL)
  • 任意: headersquerybody (文字列。式 (例:=js:({…}))
uip flow node configure invoice-flow.flow node_abc --detail '{
  "authentication": "manual",
  "method":         "GET",
  "url":            "https://api.example.com/data",
  "headers":        { "Authorization": "Bearer <token>" }
}'
uip flow node configure invoice-flow.flow node_abc --detail '{
  "authentication": "manual",
  "method":         "GET",
  "url":            "https://api.example.com/data",
  "headers":        { "Authorization": "Bearer <token>" }
}'

Data shape (--output json)

{
  "Code": "NodeConfigureSuccess",
  "Data": {
    "NodeId": "node_a1b2c3d4",
    "BindingsCreated": 2,
    "DetailPopulated": true
  }
}
{
  "Code": "NodeConfigureSuccess",
  "Data": {
    "NodeId": "node_a1b2c3d4",
    "BindingsCreated": 2,
    "DetailPopulated": true
  }
}

UIP フローノードリスト

.flowファイル内のすべてのノードのリストを取得します。

引数

  • <file> (必須).flow ファイルのパスです。

Data shape (--output json)

{
  "Code": "NodeListSuccess",
  "Data": {
    "Nodes": [
      { "id": "start",          "type": "core.trigger.manual" },
      { "id": "node_a1b2c3d4",  "type": "core.action.http.v2" }
    ],
    "Count": 2
  }
}
{
  "Code": "NodeListSuccess",
  "Data": {
    "Nodes": [
      { "id": "start",          "type": "core.trigger.manual" },
      { "id": "node_a1b2c3d4",  "type": "core.action.http.v2" }
    ],
    "Count": 2
  }
}

各エントリには、少なくとも idtypeが含まれます。また、 .flow definitions[] 配列から表示メタデータもアタッチします。


UIP フロー ノードの削除

ノードとノードが所有するすべてのものを削除します。削除:

  • 接続されたエッジ
  • 孤立した装丁
  • 孤立した定義
  • 削除されたノードが所有するノード変数
  • 削除されたノードが所有する変数の更新

引数

  • <file> (必須).flow ファイルのパスです。
  • <node-id> (必須) — 削除するノードの ID。

Data shape (--output json)

{
  "Code": "NodeDeleteSuccess",
  "Data": {
    "DeletedNode":           { "id": "node_a1b2c3d4", "type": "core.action.http.v2" },
    "EdgesRemoved":          1,
    "BindingsRemoved":       0,
    "DefinitionsRemoved":    0,
    "VariablesRemoved":      0,
    "VariableUpdatesRemoved": 0
  }
}
{
  "Code": "NodeDeleteSuccess",
  "Data": {
    "DeletedNode":           { "id": "node_a1b2c3d4", "type": "core.action.http.v2" },
    "EdgesRemoved":          1,
    "BindingsRemoved":       0,
    "DefinitionsRemoved":    0,
    "VariablesRemoved":      0,
    "VariableUpdatesRemoved": 0
  }
}

UIP フロー エッジ追加

2 つのノードの間にエッジを追加します。

引数

  • <file> (必須).flow ファイルのパスです。
  • <source-id> (必須) — ソース ノードの ID。
  • <target-id> (必須) — ターゲット ノードの ID。

オプション

  • --source-port <port> — 送信元ポート名(デフォルト: output)。
  • --target-port <port> — ターゲットポート名 (デフォルト: input)。

Data shape (--output json)

{
  "Code": "EdgeAddSuccess",
  "Data": {
    "Edge": {
      "id":         "edge_a1b2c3d4",
      "source":     "Node_1",
      "target":     "Node_2",
      "sourcePort": "output",
      "targetPort": "input"
    }
  }
}
{
  "Code": "EdgeAddSuccess",
  "Data": {
    "Edge": {
      "id":         "edge_a1b2c3d4",
      "source":     "Node_1",
      "target":     "Node_2",
      "sourcePort": "output",
      "targetPort": "input"
    }
  }
}

UIP フロー エッジ リスト

{
  "Code": "EdgeListSuccess",
  "Data": {
    "Edges": [
      { "id": "edge_a1b2c3d4", "source": "Node_1", "target": "Node_2" }
    ],
    "Count": 1
  }
}
{
  "Code": "EdgeListSuccess",
  "Data": {
    "Edges": [
      { "id": "edge_a1b2c3d4", "source": "Node_1", "target": "Node_2" }
    ],
    "Count": 1
  }
}

uip フロー エッジの削除

ID で 1 つのエッジを削除します。edge list を使用して ID を検索します。

{
  "Code": "EdgeDeleteSuccess",
  "Data": {
    "DeletedEdge": { "id": "edge_a1b2c3d4", "source": "Node_1", "target": "Node_2" }
  }
}
{
  "Code": "EdgeDeleteSuccess",
  "Data": {
    "DeletedEdge": { "id": "edge_a1b2c3d4", "source": "Node_1", "target": "Node_2" }
  }
}

変数と変数の更新

2つのコンパニオンコマンドグループ(まだサイドバーにはありません)は、.flowファイルのvariablesおよびvariable-updateサブツリーを編集します。

uip フロー変数

uip flow variable add    <file> <variable-id> -d <direction> [-t <type>] [--default-value <val>] [--description <text>] [--schema <json>] [--sub-type <type>]
uip flow variable list   <file>
uip flow variable delete <file> <variable-id>
uip flow variable add    <file> <variable-id> -d <direction> [-t <type>] [--default-value <val>] [--description <text>] [--schema <json>] [--sub-type <type>]
uip flow variable list   <file>
uip flow variable delete <file> <variable-id>
  • directioninoutinout (必須)。
  • typestringnumberbooleanobjectarrayfile (既定値は stringです)。
  • --default-value--type ごとに解析されます — object/array 値は、一致するシェイプの有効なJSONである必要があります。
  • --schema JSON オブジェクト (例:'{"type":"string"}')。

データ形状: VariableAddSuccess (Data.Variable)、 VariableListSuccess ( Data.Variables[]Count)、 VariableDeleteSuccess (Data.DeletedVariable)。

uip flow variable-update

完了時に実行され、グローバル変数( out または inoutである必要があります)に割り当てるノードにJS式をアタッチします。

uip flow variable-update add    <file> --node-id <id> --variable-id <id> --expression <expr>
uip flow variable-update list   <file> [--node-id <id>]
uip flow variable-update delete <file> <node-id> <variable-id>
uip flow variable-update add    <file> --node-id <id> --variable-id <id> --expression <expr>
uip flow variable-update list   <file> [--node-id <id>]
uip flow variable-update delete <file> <node-id> <variable-id>

式がない場合は、 =js: が自動的にプレフィックスとして付けられます。例: --expression "=js:ctx.output"

データ形状: VariableUpdateAddSuccess (Data.VariableUpdate)、 VariableUpdateListSuccess ( Data.VariableUpdates[]Count)、 VariableUpdateDeleteSuccess (Data.DeletedUpdate)。


Bindings

バインディングは、パブリッシュ/デプロイ時にフローが必要とする外部リソース(ターゲットプロセス、エージェント、接続、キューなど)と、それらが接続するノードプロパティを宣言します。

uip flow binding add    <file> <name> <resource> <default-value> [--resource-key <key>] [--property-attribute <attr>] [--resource-sub-type <type>]
uip flow binding list   <file>
uip flow binding delete <file> <resource-key>
uip flow binding add    <file> <name> <resource> <default-value> [--resource-key <key>] [--property-attribute <attr>] [--resource-sub-type <type>]
uip flow binding list   <file>
uip flow binding delete <file> <resource-key>
  • <resource> 、サービスの VALID_RESOURCE_TYPES の 1 つである必要があります (無効な値が渡された場合に add コマンドのエラー メッセージに表示されます)。
  • --property-attribute バインドによって設定されるターゲット ノード プロパティ (例:namefolderPathconnection)。
  • --resource-sub-type では下位分類が提供されます (例:AgentProcess)。
  • binding delete 、ID による単一のエントリではなく、指定されたリソース キーを持つ すべての バインドを削除します。

データ形状: BindingAddSuccess (Data.Binding)、 BindingListSuccess (Data.Bindings[]Count)、 BindingDeleteSuccess (Data.DeletedBindings[]Count)。


uip flow tidy

自動レイアウト: .flow ファイル内のノードを再配置して、オーバーラップを削除し、グラフをきれいに配置します。

uip flow tidy <file>
uip flow tidy <file>

データシェイプ: Code: "FlowTidy"Data: { File, NodesTotal, EdgesTotal, NodesRepositioned }

参照

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

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得