UiPath Documentation
getting-started
latest
false
Guía del desarrollador de introducción
  • Introducción
    • Información general
    • Environment set up
  • Primeros pasos con los agentes de UiPath
  • Primeros pasos con los agentes de UiPath utilizando LangGraph
  • Crear un agente de código bajo en Studio Web
  • Añadir herramientas a tu agente de UiPath
  • Getting Started with UiPath Maestro Flow
    • Introducción
    • Crea el flujo
    • Verify the flow
    • Test the flow
    • Deploy the flow
    • Run the flow
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.

Verify the flow

Verify that the Price Watch Flow has been built correctly without any errors or warnings.

Step 3 - Verify the flow

In the steps below, we will use the UiPath CLI (uip) to validate our flow, and cover some common warnings and errors it would pick up. This section teaches you how to use the CLI to look at how your Flow is configured, and validate it. Feel free to skip to the Testing the Flow section and come back later if you prefer that approach.

3.1 - Confirm the nodes and connections

Run the following command to list the nodes:

uip maestro flow node list PriceWatch/PriceWatch.flow --output table
uip maestro flow node list PriceWatch/PriceWatch.flow --output table

The node list should hold exactly these six ids:

Id              | Type                | Label
----------------|---------------------|-----------------
start           | core.trigger.manual | Manual trigger
fetchRate1      | core.action.http.v2 | Fetch rate
reshapeRate1    | core.action.script  | Reshape rate
belowThreshold1 | core.logic.decision | Below threshold
endAlert1       | core.control.end    | End alert
endNoAction1    | core.control.end    | End no action
Id              | Type                | Label
----------------|---------------------|-----------------
start           | core.trigger.manual | Manual trigger
fetchRate1      | core.action.http.v2 | Fetch rate
reshapeRate1    | core.action.script  | Reshape rate
belowThreshold1 | core.logic.decision | Below threshold
endAlert1       | core.control.end    | End alert
endNoAction1    | core.control.end    | End no action

Next, run the following command to check the connections (edges) between nodes:

uip maestro flow edge list PriceWatch/PriceWatch.flow --output table
uip maestro flow edge list PriceWatch/PriceWatch.flow --output table

The edge list should hold five edges, and the Decision node must appear twice as a source, once on its true port and once on false. A Decision node with one outgoing edge is the single most consequential structural defect in this flow, and the next section explains how to check for it.

Id                                         | Source                | Target               
-------------------------------------------|-----------------------|----------------------
start-output-fetchRate1-input              | start:output          | fetchRate1:input     
fetchRate1-default-reshapeRate1-input      | fetchRate1:default    | reshapeRate1:input   
reshapeRate1-success-belowThreshold1-input | reshapeRate1:success  | belowThreshold1:input
belowThreshold1-true-endAlert1-input       | belowThreshold1:true  | endAlert1:input      
belowThreshold1-false-endNoAction1-input   | belowThreshold1:false | endNoAction1:input   
Id                                         | Source                | Target               
-------------------------------------------|-----------------------|----------------------
start-output-fetchRate1-input              | start:output          | fetchRate1:input     
fetchRate1-default-reshapeRate1-input      | fetchRate1:default    | reshapeRate1:input   
reshapeRate1-success-belowThreshold1-input | reshapeRate1:success  | belowThreshold1:input
belowThreshold1-true-endAlert1-input       | belowThreshold1:true  | endAlert1:input      
belowThreshold1-false-endNoAction1-input   | belowThreshold1:false | endNoAction1:input   

If your IDs differ, fix them now rather than adapting the expressions on the pages that follow. To change the IDs, follow the steps outlined for how to rename a node ID.

3.2 - Check for warnings and errors

The validation command reads the whole file, validates it, and it is a good habit to run it before you deploy a Flow to surface potential mistakes. Use the following command:

uip maestro flow validate PriceWatch/PriceWatch.flow
uip maestro flow validate PriceWatch/PriceWatch.flow

Confirm that you see "Status": "Valid" with no Warnings fields (the File field will contain the full, absolute path of the .flow file depending on your operating system and username):

{
  "Result": "Success",
  "Code": "FlowValidate",
  "Data": {
    "File": "/home/user/tutorial-maestro-flow-price-watch/PriceWatch/PriceWatch.flow",
    "Status": "Valid"
  }
}
{
  "Result": "Success",
  "Code": "FlowValidate",
  "Data": {
    "File": "/home/user/tutorial-maestro-flow-price-watch/PriceWatch/PriceWatch.flow",
    "Status": "Valid"
  }
}

If you do not see any Warnings, feel free to skip to the next step to Test the Flow.

Consejo:

Running the validate command before running the Flow is strongly recommended to avoid issues like the ones shown below. Both uip maestro flow debug and uip maestro flow publish will complete successfully with warnings, and only fail if there were errors. If you are setting up Continuous Integration / Continuous Deployment (CI/CD) workflows, remember to add uip maestro flow validate before the publish command to ensure it does not publish or deploy a package that has warnings.

Common Warnings

Here are two common warnings types to keep an eye out for, and how to fix them:

  1. A missing triggerNodeId on an input variable, which means it was set up as a global variable, not a trigger input variable. Global variables can be read and set by any node, and will not be shown when triggering the Flow manually as a required value to provide.

    - [variables.globals[baseCurrency].triggerNodeId] Input variable "baseCurrency" is
      read via `$vars.start.output.baseCurrency`, but it has no "triggerNodeId". At
      runtime the trigger "start" output will not contain "baseCurrency", so the value
      resolves to null (a downstream node may fault, e.g. "Cannot read property '…' of
      null"). Set "triggerNodeId": "start" on the "baseCurrency" global.
    - [variables.globals[baseCurrency].triggerNodeId] Input variable "baseCurrency" is
      read via `$vars.start.output.baseCurrency`, but it has no "triggerNodeId". At
      runtime the trigger "start" output will not contain "baseCurrency", so the value
      resolves to null (a downstream node may fault, e.g. "Cannot read property '…' of
      null"). Set "triggerNodeId": "start" on the "baseCurrency" global.
    

    To fix this issue, first delete the global baseCurrency variable, and then edit the start trigger node to add the baseCurrency variable on that node (refer to step 2.1).

  2. MISSING_OUTPUT_MAPPING - an End node that does not set the output variable(s), and will return them with null values - any downstream system or Flow that needs them will likely error if the values are not set.

    - [nodes[endAlert1].outputs.watchResult.source] [MISSING_OUTPUT_MAPPING] "End alert"
      is missing output mapping for "watchResult"
    - [nodes[endAlert1].outputs.watchResult.source] [MISSING_OUTPUT_MAPPING] "End alert"
      is missing output mapping for "watchResult"
    

    To fix this issue, edit the endAlert1 node and add the missing code to set the watchResult variable (refer to steps 2.5 and 2.6).

Consejo:

Each End node will have one field per output variable created in the Flow. This ensures that all possible End nodes will return the same outputs, but how they are set is configured on each individual End node. A useful way to think about this is that the Trigger node's input variables and the End nodes' output variable are the contract values needed for this Flow, similar to request and response objects for an API call.

If an output mapping is not set on an End node, it will be highlighted with a red warning for "End" is missing output mapping for "<name>" when viewing the node's properties in the canvas in VS Code. That is the same warning that uip maestro flow validate shows as MISSING_OUTPUT_MAPPING.


We can now Test the Flow using the Debug command.

  • Step 3 - Verify the flow
  • 3.1 - Confirm the nodes and connections
  • 3.2 - Check for warnings and errors
  • Common Warnings

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado