uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。
“uip Maestro bpmn init”的语法和选项,可使用有效的 BPMN 2.0 入门版和 Orchestrator 元数据文件构建新的 Maestro 项目。
uip maestro bpmn init 使用有效的 BPMN 2.0 入门版以及 Orchestrator 需要用于流程编排包的元数据文件,构建一个新的 Maestro 项目目录。它已在 bpmn 分支下注册。
大纲
uip maestro bpmn init <name> [--process-id <id>] [--force] [--skip-solution-registration]
uip maestro bpmn init <name> [--process-id <id>] [--force] [--skip-solution-registration]
参数
<name>(必填) — 项目文件夹名称。已验证VALID_PROJECT_NAME_REGEX:仅限字母、数字、下划线 (_) 和连字符 (-)。
选项
| 选项 | 描述 |
|---|---|
--process-id <id> | 要写入生成的模板的 BPMN 流程 ID。默认值:Process_1。 |
--force | 即使目标目录存在且非空,也进行初始化。现有文件不会被清除 — 文件会同时写入;这适用于在预先创建的文件夹中重新初始化。 |
--skip-solution-registration | 不会在相关解决方案中自动注册此项目(请参阅下方的“行为”)。 |
行为
在当前工作目录中创建<name>/并写入六个文件:
| 文件 | 用途 |
|---|---|
project.uiproj | { "Name": "<name>", "ProjectType": "ProcessOrchestration" } |
operate.json | runtime 元数据 — targetFramework: "Portable" 、 contentType: "processOrchestration" 、 runtimeOptions.isAttended: false 。 |
entry-points.json | 一个入口点指向入门版 BPMN 内的Event_start ,输入/输出架构为空。 |
bindings_v2.json | { "version": "2.0", "resources": [] }。 |
package-descriptor.json | 打包程序使用的文件清单。 |
<name>.bpmn | 包含 Event_start → _Implicit_EndEvent 的入门版 BPMN,使用 uipath:entryPointId 与 --process-id 扩展程序连接(默认为 Process_1)。 |
在写入之前,通过bpmn-moddle解析入门BPMN;如果出现结构(非 UiPath 扩展程序)警告,则该命令将失败,并显示BPMN validation failed: … 。
如果<name>已存在且非空,而且未设置--force ,则命令将失败并显示错误。
解决方案自动注册:除非--skip-solution-registration被传递,否则init会查找围绕的解决方案。如果在其中一个项目中运行,则新项目将注册到其中。如果在任何解决方案外部运行,则系统会自动构建父级 <name>Solution,并将项目嵌套在其中 — 默认情况下,以及仅在显式请求时发生,都会发生这种情况。
示例
# Create a new project in ./invoice-orchestration
uip maestro bpmn init invoice-orchestration
# Set a custom BPMN process ID
uip maestro bpmn init invoice-orchestration --process-id InvoiceApproval
# Reinitialize into an existing non-empty folder
uip maestro bpmn init invoice-orchestration --force
# Scaffold standalone, without touching any surrounding solution
uip maestro bpmn init invoice-orchestration --skip-solution-registration
# Create a new project in ./invoice-orchestration
uip maestro bpmn init invoice-orchestration
# Set a custom BPMN process ID
uip maestro bpmn init invoice-orchestration --process-id InvoiceApproval
# Reinitialize into an existing non-empty folder
uip maestro bpmn init invoice-orchestration --force
# Scaffold standalone, without touching any surrounding solution
uip maestro bpmn init invoice-orchestration --skip-solution-registration
数据形状(--输出 json)
{
"Code": "MaestroInit",
"Data": {
"Status": "Created successfully",
"Path": "/workspace/invoice-orchestration",
"SolutionRegistration": { "...": "registration outcome against the surrounding or newly created solution" },
"AutoCreatedSolution": { "...": "present only when a parent <name>Solution was scaffolded automatically" },
"ProjectArtifacts": { "...": "present only when additional project artifacts were generated" },
"NextSteps": "present only when SolutionRegistration carries follow-up instructions"
}
}
{
"Code": "MaestroInit",
"Data": {
"Status": "Created successfully",
"Path": "/workspace/invoice-orchestration",
"SolutionRegistration": { "...": "registration outcome against the surrounding or newly created solution" },
"AutoCreatedSolution": { "...": "present only when a parent <name>Solution was scaffolded automatically" },
"ProjectArtifacts": { "...": "present only when additional project artifacts were generated" },
"NextSteps": "present only when SolutionRegistration carries follow-up instructions"
}
}
AutoCreatedSolution、ProjectArtifacts 和 NextSteps 在不适用时将完全省略 — 只有 Status、Path 和 SolutionRegistration 始终存在。失败时,响应会包含 Result: "Failure"、Message 和 Instructions。
另请参阅
uip maestro bpmn pack— 打包框架内的项目uip maestro bpmn debug— 通过 Studio Web 运行uip maestro bpmn validate— 打包前验证- Maestro 概述