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

uip rules validate

Syntax and options for `uip rules validate`, which checks a Business Rules project for the errors Studio Web blocks publish and debug on.

uip rules validate checks a Business Rules project for what Studio Web blocks publish and debug on. It reports two kinds of diagnostics:

  • The Studio Web designer's diagnostics for each .dmn file at the top level of the project. Their codes start with DMN_.
  • RULES_ENTRY_POINTS_STALE when entry-points.json does not match the .dmn files. Run uip rules refresh to fix it.

Diagnostics with severity error fail the command. Diagnostics with severity warning are reported only. The command does not write any file.

大纲​

uip rules validate <project-path>
uip rules validate <project-path>

参数​

名称必填用途
<project-path>是Path to the Business Rules project directory. The directory must contain project.uiproj.

示例​

uip rules validate ./LoanEligibilitySolution/LoanEligibility
uip rules validate ./LoanEligibilitySolution/LoanEligibility

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

{
  "Code": "RulesValidate",
  "Data": {
    "Status": "Valid",
    "ProjectPath": "/workspace/LoanEligibilitySolution/LoanEligibility",
    "DmnFiles": ["Business rule.dmn"],
    "Diagnostics": []
  }
}
{
  "Code": "RulesValidate",
  "Data": {
    "Status": "Valid",
    "ProjectPath": "/workspace/LoanEligibilitySolution/LoanEligibility",
    "DmnFiles": ["Business rule.dmn"],
    "Diagnostics": []
  }
}

When the project has at least one error, the command returns a failure envelope with Code: "RulesValidate", ErrorCode: "invalid_argument", and Data.Status: "Invalid". Instructions lists each diagnostic on its own line.

Each entry in Diagnostics has these fields:

字段描述
FileThe file the diagnostic applies to: a .dmn file, or entry-points.json.
CodeThe diagnostic code, for example RULES_ENTRY_POINTS_STALE.
Severityerror 或 warning。
MessageThe diagnostic message.
InstructionsHow to fix the issue, when available.
TargetThe element of the document the diagnostic points to.

退出代码​

Refer to Exit codes for the shared contract. The command exits 1 when any diagnostic has severity error, or when the project has no .dmn file at its top level (ErrorCode: "not_found").

另请参阅​

  • uip rules for the tool overview and project layout.

此页面有帮助吗?

连接

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

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

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

保持更新