UiPath Documentation
uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

uip rules init

Syntax and options for `uip rules init`, which creates a Business Rules project seeded with one decision table and registers it in a solution.

uip rules init creates a Business Rules project seeded with one decision table. The project holds project.uiproj, Business rule.dmn, entry-points.json, and bindings_v2.json.

Where the project lands depends on the current directory:

  • Inside an existing solution, the project is created at ./<name> and added to that solution's .uipx manifest.
  • Outside a solution, a parent solution named <name>Solution is created, and the project is created inside it at ./<name>Solution/<name>.
  • With --skip-solution-registration, the project is created at ./<name> and is not registered in any solution.

大纲​

uip rules init <name> [--force] [--skip-solution-registration]
uip rules init <name> [--force] [--skip-solution-registration]

参数​

名称必填用途
<name>是Business Rules project name. Letters, numbers, underscores (_), and hyphens (-) only.

选项​

长值默认描述
--force标记关闭Initialize the project even if the target directory exists and is not empty. When the directory already holds a .dmn file, the existing rule files are left as they are and RuleStatus is Preserved.
--skip-solution-registration标记关闭Do not register the project in the surrounding solution, and do not create a parent solution. SolutionRegistration.Status is OptedOut.

示例​

# Create a project; outside a solution, a parent my-rules-projectSolution is created
uip rules init my-rules-project
# Create a project; outside a solution, a parent my-rules-projectSolution is created
uip rules init my-rules-project

数据形状(--输出 json)​

{
  "Code": "RulesInit",
  "Data": {
    "Status": "Created successfully",
    "Path": "/workspace/my-rules-projectSolution/my-rules-project",
    "RuleStatus": "Created",
    "SolutionRegistration": {
      "Status": "Registered",
      "Message": "Project registered in parent solution.",
      "Solution": "/workspace/my-rules-projectSolution/my-rules-projectSolution.uipx",
      "Project": "my-rules-project/project.uiproj",
      "ProjectId": "00000000-0000-0000-0000-000000000000",
      "Instructions": "The project is listed in the parent solution manifest.\nPacking or uploading the solution will sync solution resources automatically."
    },
    "AutoCreatedSolution": {
      "Name": "my-rules-projectSolution",
      "Path": "/workspace/my-rules-projectSolution",
      "SolutionFile": "/workspace/my-rules-projectSolution/my-rules-projectSolution.uipx"
    },
    "ProjectArtifacts": { "Created": true },
    "NextSteps": "The project is listed in the parent solution manifest.\nPacking or uploading the solution will sync solution resources automatically."
  }
}
{
  "Code": "RulesInit",
  "Data": {
    "Status": "Created successfully",
    "Path": "/workspace/my-rules-projectSolution/my-rules-project",
    "RuleStatus": "Created",
    "SolutionRegistration": {
      "Status": "Registered",
      "Message": "Project registered in parent solution.",
      "Solution": "/workspace/my-rules-projectSolution/my-rules-projectSolution.uipx",
      "Project": "my-rules-project/project.uiproj",
      "ProjectId": "00000000-0000-0000-0000-000000000000",
      "Instructions": "The project is listed in the parent solution manifest.\nPacking or uploading the solution will sync solution resources automatically."
    },
    "AutoCreatedSolution": {
      "Name": "my-rules-projectSolution",
      "Path": "/workspace/my-rules-projectSolution",
      "SolutionFile": "/workspace/my-rules-projectSolution/my-rules-projectSolution.uipx"
    },
    "ProjectArtifacts": { "Created": true },
    "NextSteps": "The project is listed in the parent solution manifest.\nPacking or uploading the solution will sync solution resources automatically."
  }
}
字段描述
RuleStatusCreated when the seeded decision table was written. Preserved when the project already held a .dmn file.
SolutionRegistration.StatusOne of Registered, AlreadyRegistered, Skipped, Failed, NotInSolution, or OptedOut.
AutoCreatedSolutionPresent only when init created the parent solution.
ProjectArtifactsPresent only when the project was registered in a solution.
NextStepsPresent only when the registration returned instructions.

退出代码​

Refer to Exit codes for the shared contract. The command exits 1 when the name contains characters other than letters, numbers, underscores, and hyphens, or when the target directory exists and is not empty and --force is not passed.

另请参阅​

  • uip rules for the tool overview and project layout.

此页面有帮助吗?

连接

需要帮助? 支持(opens in new window)

想要了解详细内容? UiPath Academy(opens in new window)

有问题? UiPath 论坛(opens in new window)

保持更新