Syntax and options for `uip maestro flow node` and `uip maestro flow edge`, which add, configure, list, and remove nodes and edges in a `.flow` file.
A Flow is a graph. Nodes are the vertices (triggers, activities, connectors, agents); edges are the directed connections between them. The uip maestro flow node and uip maestro flow edge commands edit a .flow file in place — adding, configuring, listing, and removing both.
此页还涵盖以相同方式编辑.flow文件的三个附带命令组: variable 、 variable-update和binding 。
大纲
uip maestro flow node add <file> <node-type> [-i <json>] [--position <x,y>] [--label <label>] [--source <uuid>]
uip maestro flow node configure <file> <node-id> --detail <json>
uip maestro flow node list <file>
uip maestro flow node remove <file> <node-id>
uip maestro flow edge add <file> <source-id> <target-id> [--source-port <port>] [--target-port <port>]
uip maestro flow edge list <file>
uip maestro flow edge remove <file> <edge-id>
uip maestro flow node add <file> <node-type> [-i <json>] [--position <x,y>] [--label <label>] [--source <uuid>]
uip maestro flow node configure <file> <node-id> --detail <json>
uip maestro flow node list <file>
uip maestro flow node remove <file> <node-id>
uip maestro flow edge add <file> <source-id> <target-id> [--source-port <port>] [--target-port <port>]
uip maestro flow edge list <file>
uip maestro flow edge remove <file> <edge-id>
uip maestro flow node add
向.flow文件添加节点。节点类型必须存在于注册表中 — 使用uip maestro flow registry search发现有效的<node-type>值。
参数
<file>(必填) —.flow文件的路径。<node-type>(必填项) — 节点类型标识符(例如core.trigger.manual、uipath.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 maestro flow node add invoice-flow.flow uipath.connector.slack.send-message --label "Notify team"
uip maestro flow node add invoice-flow.flow uipath.connector.slack.send-message --label "Notify team"
数据形状 ( --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
}
}
在第一次插入给node-type DefinitionAdded时为true — 会创建.flow definitions[]中的相应条目。
uip maestro flow node configure
在已添加的节点上填充inputs.detail并创建其所需的工作流绑定。在node add之后为连接器和托管 HTTP 节点运行此操作。
参数
<file>(必填) —.flow文件的路径。<node-id>(必填) — 要配置的节点的 ID(使用node list查找)。
选项
--detail <json>(必填) — 配置 JSON。形状取决于节点类型:
连接器节点 (uipath.connector.*)
在registry get输出中从connectorMethodInfo获取method和endpoint 。
- 必需:
connectionId、folderKey、method、endpoint - 可选:
bodyParameters、queryParameters、pathParameters
uip maestro 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 maestro 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)
两种身份验证模式:
连接器模式( authentication: "connector" ) — 使用 Integration Service 连接进行身份验证:
- 必需:
authentication、method、connectionId、folderKey、targetConnector method→GET、POST、PUT、PATCH、DELETE、OPTIONS、HEAD- 可选:
url(路径附加到连接器基本 URL)、headers、query、body
uip maestro flow node configure invoice-flow.flow node_abc --detail '{
"authentication": "connector",
"targetConnector": "uipath-microsoft-outlook365",
"connectionId": "…",
"folderKey": "…",
"method": "GET",
"url": "/me"
}'
uip maestro flow node configure invoice-flow.flow node_abc --detail '{
"authentication": "connector",
"targetConnector": "uipath-microsoft-outlook365",
"connectionId": "…",
"folderKey": "…",
"method": "GET",
"url": "/me"
}'
手动模式( authentication: "manual" ) — 无需连接器身份验证,请自行提供完整的 URL 和任何身份验证标头:
- 必需:
authentication、method、url(完整 URL) - 可选:
headers、query、body(字符串;可以是表达式,例如=js:({…}))。
uip maestro flow node configure invoice-flow.flow node_abc --detail '{
"authentication": "manual",
"method": "GET",
"url": "https://api.example.com/data",
"headers": { "Authorization": "Bearer <token>" }
}'
uip maestro flow node configure invoice-flow.flow node_abc --detail '{
"authentication": "manual",
"method": "GET",
"url": "https://api.example.com/data",
"headers": { "Authorization": "Bearer <token>" }
}'
数据形状 ( --output json )
{
"Code": "NodeConfigureSuccess",
"Data": {
"NodeId": "node_a1b2c3d4",
"BindingsCreated": 2,
"DetailPopulated": true
}
}
{
"Code": "NodeConfigureSuccess",
"Data": {
"NodeId": "node_a1b2c3d4",
"BindingsCreated": 2,
"DetailPopulated": true
}
}
uip maestro flow node list
列出.flow文件中的所有节点。
参数
<file>(必填) —.flow文件的路径。
数据形状 ( --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
}
}
每个条目至少包含id和type ;该服务还会附加.flow definitions[]数组中的显示元数据。
uip maestro flow node remove
Remove a node and everything it owns. Removes:
- 已连接的边线
- 孤立绑定
- 孤立定义
- Node variables owned by the removed node
- Variable updates owned by the removed node
参数
<file>(必填) —.flow文件的路径。<node-id>(必填) — 要删除的节点的 ID。
数据形状 ( --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 maestro flow edge add
在两个节点之间添加边线。
参数
<file>(必填) —.flow文件的路径。<source-id>(必填) — 源节点的 ID。<target-id>(必填) — 目标节点的 ID。
选项
--source-port <port>— 源端口名称(默认值:output)。--target-port <port>— 目标端口名称(默认:input)。
数据形状 ( --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 maestro flow edge list
{
"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 maestro flow edge remove
Removes a single edge by ID. Use edge list to find the 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" }
}
}
变量和变量更新
两个附带命令组(尚未在侧边栏中)编辑.flow文件的variables和变量更新子树。
uip maestro flow variable
uip maestro flow variable add <file> <variable-id> -d <direction> [-t <type>] [--default-value <val>] [--description <text>] [--schema <json>] [--sub-type <type>]
uip maestro flow variable list <file>
uip maestro flow variable remove <file> <variable-id>
uip maestro flow variable add <file> <variable-id> -d <direction> [-t <type>] [--default-value <val>] [--description <text>] [--schema <json>] [--sub-type <type>]
uip maestro flow variable list <file>
uip maestro flow variable remove <file> <variable-id>
direction→in、out、inout(必填项)。type→string、number、boolean、object、array、file(默认为string)。--default-value的解析方式为--type—objectarray的值必须是匹配形状的有效 JSON。--schema必须是 JSON 对象(例如'{"type":"string"}')。
数据形状: VariableAddSuccess ( Data.Variable )、 VariableListSuccess ( Data.Variables[] 、 Count )、 VariableDeleteSuccess ( Data.DeletedVariable )。
uip maestro flow variable-update
将 JS 表达式附加到完成时运行的节点,并赋值给全局变量(必须为out或inout )。
uip maestro flow variable-update add <file> --node-id <id> --variable-id <id> --expression <expr>
uip maestro flow variable-update list <file> [--node-id <id>]
uip maestro flow variable-update remove <file> <node-id> <variable-id>
uip maestro flow variable-update add <file> --node-id <id> --variable-id <id> --expression <expr>
uip maestro flow variable-update list <file> [--node-id <id>]
uip maestro flow variable-update remove <file> <node-id> <variable-id>
如果表达式缺失,系统会自动使用=js:为其添加前缀。示例: --expression "=js:ctx.output" 。
数据形状: VariableUpdateAddSuccess ( Data.VariableUpdate )、 VariableUpdateListSuccess ( Data.VariableUpdates[] 、 Count )、 VariableUpdateDeleteSuccess ( Data.DeletedUpdate )。
Bindings
绑定声明了流在发布/部署时所需的外部资源(目标流程、智能体、连接、队列等),以及它们连接到的节点属性。
uip maestro flow binding add <file> <name> <resource> <default-value> [--resource-key <key>] [--property-attribute <attr>] [--resource-sub-type <type>]
uip maestro flow binding list <file>
uip maestro flow binding remove <file> <resource-key>
uip maestro flow binding add <file> <name> <resource> <default-value> [--resource-key <key>] [--property-attribute <attr>] [--resource-sub-type <type>]
uip maestro flow binding list <file>
uip maestro flow binding remove <file> <resource-key>
<resource>必须是服务的其中一个VALID_RESOURCE_TYPES(如果传递的值无效,则在add命令的错误消息中显示)。--property-attribute是绑定填充的目标节点属性(例如name、folderPath、connection)。--resource-sub-type提供子分类(例如Agent、Process)。binding delete根据给定资源密钥删除所有绑定,而非按 ID 删除单个条目。
数据形状: BindingAddSuccess ( Data.Binding )、 BindingListSuccess ( Data.Bindings[] 、 Count )、 BindingDeleteSuccess ( Data.DeletedBindings[] 、 Count )。
uip maestro flow format
自动布局:重新定位.flow文件中的节点,以删除重叠并清晰地排列图表。
uip maestro flow format <file>
uip maestro flow format <file>
数据形状: Code: "FlowTidy" 、 Data: { File, NodesTotal, EdgesTotal, NodesRepositioned } 。
另请参阅
uip maestro flow registry— 发现节点类型uip maestro flow validate— 验证编辑后的.flowuip maestro flow init- 流概述
- 大纲
- uip maestro flow node add
- 参数
- 选项
- 示例
- 数据形状 (
--output json) - uip maestro flow node configure
- 参数
- 选项
- 连接器节点 (uipath.connector.*)
- 托管 HTTP 节点 (core.action.http.v2)
- 数据形状 (
--output json) - uip maestro flow node list
- 参数
- 数据形状 (
--output json) - uip maestro flow node remove
- 参数
- 数据形状 (
--output json) - uip maestro flow edge add
- 参数
- 选项
- 数据形状 (
--output json) - uip maestro flow edge list
- uip maestro flow edge remove
- 变量和变量更新
- uip maestro flow variable
- uip maestro flow variable-update
- Bindings
- uip maestro flow format
- 另请参阅