- Introduction
- Commencer avec les agents UiPath
- Premiers pas avec les agents UiPath utilisant LangGraph
- Créer un agent low-code dans Studio Web
- Ajouter des outils à votre agent UiPath
- Getting Started with UiPath Maestro 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.
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:
-
A missing
triggerNodeIdon 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
baseCurrencyvariable, and then edit thestarttrigger node to add thebaseCurrencyvariable on that node (refer to step 2.1). -
MISSING_OUTPUT_MAPPING- an End node that does not set the output variable(s), and will return them withnullvalues - 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"
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.