uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。
“uip Maestro Flow init”的语法和选项,可使用最小的清单和入门“.flow”文件构建一个新的 Flow 项目。
uip maestro flow init使用最小清单文件和包含单个手动触发节点的入门版.flow文件构建一个新的 Flow 项目目录。
大纲
uip maestro flow init <name> [--force] [--skip-solution-registration]
uip maestro flow init <name> [--force] [--skip-solution-registration]
参数
<name>(必填) — 项目文件夹名称。已验证VALID_PROJECT_NAME_REGEX:仅限字母、数字、下划线 (_) 和连字符 (-)。
选项
--force— 即使目标目录存在且不为空,也会进行初始化。现有文件不会被清除 — 文件会同时写入;这适用于在预先创建的文件夹中重新初始化。--skip-solution-registration— 不在相关解决方案中自动注册此项目(请参阅下面的行为)。
行为
此命令将两个文件写入 <name>/:
project.uiproj—{ "Name": "<name>", "ProjectType": "Flow" }<name>.flow— 种子流 JSON,包含:- 将一个
core.trigger.manual开始节点关联到生成的entryPointId definitions[]中匹配的节点定义- 空
edges、bindings、variables - 画布
layout.nodes.start位置
- 将一个
解决方案自动注册。除非传递 --skip-solution-registration:
- 如果当前目录已在解决方案中,则系统将在其中创建
<name>/,并在该解决方案的.uipx清单文件中将其注册为项目。 - 如果当前目录不在解决方案中,则会自动构建名为
<name>Solution的父解决方案——Flow 项目最终嵌套在<name>Solution/<name>/中,而不是像从提要的字面意思阅读一样,嵌套在当前目录的<name>/中。
如果<name>已存在且非空,并且未设置--force ,则命令将失败,并显示错误,提示用户传递--force 。
示例
# 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 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
数据形状(--输出 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 将完全缺失。
失败时, Code缺失,并且响应中包含Result: "Failure" 、 Message和Instructions 。
另请参阅
uip maestro flow pack— 打包框架内的项目uip maestro flow node— 将节点添加到入门版.flow文件uip maestro flow registry— 发现要添加的节点类型- 流概述