UiPath Documentation
maestro
latest
false
Wichtig :
Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.

Benutzerhandbuch zu Maestro

Kontrollfluss

Dieser Leitfaden umfasst Folgendes:

Control flow determines how your process decides what to execute and in what order. Every process starts as a straight line of nodes, but real work requires decisions, repetition, and reunification. Flow provides four control flow nodes — Decision, Switch, Loop, and Merge — that let you branch, iterate, and converge without leaving the canvas.

Branching

Branching splits a process into separate paths so different nodes run depending on a condition.

Decision — two paths

The Decision node evaluates a single JavaScript expression and routes to one of two outputs: true or false. It fits yes/no, pass/fail, or any binary check.

$vars.httpRequest1.output.statusCode === 200
$vars.httpRequest1.output.statusCode === 200

The expression above sends successful responses down the true branch and everything else down the false branch.

Refer to the Decision node reference for the full configuration.

Switch — three or more paths

The Switch node evaluates an ordered list of case expressions and takes the first match. Add up to ten cases plus an optional default branch for anything that doesn't match.

Switch fits routing by category, status, or any value with more than two possible outcomes.

Refer to the Switch node reference for the full configuration.

Loops

Loops repeat a sequence of nodes multiple times. Flow offers two loop nodes for different situations.

Loop (For Each)

The Loop node iterates over a collection (an array) and executes its body once per item. It exposes three variables inside the loop body:

  • currentItem — the item for the current iteration
  • currentIndex — a zero-based index tracking which iteration is running
  • collection — the full array being iterated

After all iterations complete, the Loop produces an output array that aggregates the results from every iteration. Execution continues from the success handle.

A Loop node's Collection expression points to the array it iterates over, such as $vars.script1.output. The Parallel option runs all iterations at the same time instead of sequentially. Nodes connected to the loop output handle form the loop body, and the node connected to the success handle runs after all iterations complete.

Merging branches

After a Decision or Switch splits your process, use a Merge node when downstream nodes must run regardless of which branch was taken.

The Merge node accepts multiple incoming edges on its single input handle and produces one output. The last node of each branch connects to the Merge, and the process continues from the Merge output handle.

Hinweis:

Merge waits for the branch that actually executed — it doesn't wait for all incoming edges. Only the branch that received data during the current run passes through.

Practical example

Consider a process that fetches a list of support tickets, loops over each one, and routes high-priority tickets differently from the rest.

The process wires together five nodes:

  1. An HTTP Request node calls a ticket API and returns an array of ticket objects.
  2. A Loop node iterates over $vars.httpRequest1.output.body.tickets.
  3. Inside the loop body, a Decision node evaluates $vars.loop1.currentItem.priority === "high". The true branch connects to a Send Email node that alerts the on-call team; the false branch connects to a Script node that logs the ticket for later review.
  4. A Merge node connects both branches so the iteration completes cleanly regardless of which path ran.
  5. The Merge connects back to the Loop's loopBack input, and the Loop's success handle continues to the rest of the process.

This pattern — fetch, loop, branch, merge — covers a large portion of real-world automation scenarios.

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support

Möchten Sie lernen? UiPath Academy

Haben Sie Fragen? UiPath-Forum

Auf dem neuesten Stand bleiben