UiPath Documentation
uipath-cli
latest
false
Guía del usuario de UiPath CLI
Importante :
Este contenido se ha traducido mediante traducción automática. La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.

uip rules debug

Syntax and options for `uip rules debug`, which uploads a Business Rules project's solution to Studio Web and evaluates it once through the rules engine.

uip rules debug uploads the solution that holds a Business Rules project to Studio Web and evaluates the project once through the rules engine. It returns the decision outputs and any evaluation errors. With --explain, it also returns the ID of a trace that shows which rules fired.

The project must sit directly inside its solution folder, as uip rules init creates it. The first run writes the SolutionId that Studio Web assigns to the solution's .uipx file, so later runs overwrite the same Studio Web solution.

The command requires an authenticated session. Refer to Authentication.

Sinopsis​

uip rules debug <project-path> [-i <json|@file.json>] [--explain]
                [--folder-path <path> | --folder-key <key>]
                [--timeout <seconds>] [--login-validity <minutes>]
uip rules debug <project-path> [-i <json|@file.json>] [--explain]
                [--folder-path <path> | --folder-key <key>]
                [--timeout <seconds>] [--login-validity <minutes>]

Argumentos​

NombreObligatorioPropósito
<project-path>SíPath to the Business Rules project directory. The directory must contain project.uiproj.

Opciones​

CortoLargoValorPredeterminadoDescripción
-i--inputsJSON object or @file.json{}Input values for the rule, as one JSON object or a path to a file that holds one, prefixed with @.
--explainMarcaDesactivadoPublish a trace of the run and return its ID in traceId. Read the trace with uip traces spans get.
--folder-pathStringyour personal workspaceFolder to evaluate in and to publish the --explain trace into.
--folder-keyGUIDyour personal workspaceKey of the folder to evaluate in and to publish the --explain trace into. Cannot be combined with --folder-path.
--timeoutinteger (1–3600)120Maximum seconds to wait for the rules engine to evaluate.
--login-validityEntero10Minimum minutes before token expiration that trigger a session refresh before the run.

Ejemplos​

# Evaluate with one set of inputs and return the trace ID
uip rules debug ./LoanSolution/LoanEligibility --inputs '{"creditScore": 720}' --explain

# Read the inputs from a file and evaluate in a specific folder
uip rules debug ./LoanSolution/LoanEligibility --inputs @inputs.json --folder-path Shared
# Evaluate with one set of inputs and return the trace ID
uip rules debug ./LoanSolution/LoanEligibility --inputs '{"creditScore": 720}' --explain

# Read the inputs from a file and evaluate in a specific folder
uip rules debug ./LoanSolution/LoanEligibility --inputs @inputs.json --folder-path Shared

Forma de datos (--json de salida)​

Data keys are camelCase.

{
  "Code": "RulesDebug",
  "Data": {
    "solutionId": "30823424-33e3-405e-f21c-08df1c789a14",
    "projectId": "ee8a16e8-385c-42c1-81ee-1628ab7d7cb7",
    "studioWebUrl": "https://cloud.uipath.com/acme/studio_/designer/ee8a16e8-385c-42c1-81ee-1628ab7d7cb7?solutionId=30823424-33e3-405e-f21c-08df1c789a14",
    "fileName": "LoanEligibility.dmn",
    "stats": { "submitted": 1, "succeeded": 1, "failed": 0, "notEvaluated": 0 },
    "results": [
      {
        "id": "1",
        "decisions": [
          { "decisionName": "Eligibility", "outputs": { "eligible": true } }
        ]
      }
    ],
    "traceId": "499d9124f5da47462bd6535055483918"
  }
}
{
  "Code": "RulesDebug",
  "Data": {
    "solutionId": "30823424-33e3-405e-f21c-08df1c789a14",
    "projectId": "ee8a16e8-385c-42c1-81ee-1628ab7d7cb7",
    "studioWebUrl": "https://cloud.uipath.com/acme/studio_/designer/ee8a16e8-385c-42c1-81ee-1628ab7d7cb7?solutionId=30823424-33e3-405e-f21c-08df1c789a14",
    "fileName": "LoanEligibility.dmn",
    "stats": { "submitted": 1, "succeeded": 1, "failed": 0, "notEvaluated": 0 },
    "results": [
      {
        "id": "1",
        "decisions": [
          { "decisionName": "Eligibility", "outputs": { "eligible": true } }
        ]
      }
    ],
    "traceId": "499d9124f5da47462bd6535055483918"
  }
}

traceId is present only when --explain is passed and the rules engine recorded a trace. With --explain, Instructions holds the uip traces spans get command for the trace.

Códigos de salida​

Refer to Exit codes for the shared contract. The command exits 1 in these cases:

CondiciónErrorCode
The rules engine fails to evaluate the input. Data holds the same shape as a successful run, with the engine's errors in Data.results.invalid_argument
--inputs is not a JSON object, or the @file.json file cannot be read.invalid_argument
The project directory's parent folder holds no .uipx file.invalid_argument
Both --folder-path and --folder-key are passed.invalid_argument
The rules engine does not answer within --timeout seconds.timeout
Business Rules is not enabled on the tenant.configuration_error
Studio Web does not let the rules engine read the uploaded project.permission_denied

Ver también​

  • uip rules for the tool overview and project layout.

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte(opens in new window)

¿Quiere aprender? UiPath Academy(opens in new window)

¿Tiene alguna pregunta? Foro de UiPath(opens in new window)

Manténgase actualizado