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

Umschalten (Switch)

Was es tut

Routes a process to one of multiple paths based on ordered conditions. Takes the first match.

When to use this vs Decision

Use Switch when...Use Decision when...
You have three or more outcomesYou have exactly two outcomes
You're routing by multiple distinct conditionsThe condition is a simple yes/no
You need a default/fallback branch

Configuration reference

FeldErforderlichStandardBeschreibung
Fälle (Cases)Ja2 empty casesOrdered branch list. Each case has a handle label and a JavaScript expression; the first truthy expression is taken.
Include defaultNeintrueWhether to add a Default branch that is taken when no case expression matches.

Writing case expressions

Each case expression uses the same JavaScript environment as the Script and Decision nodes:

// Case 1 — high priority
$vars.ticket1.output.priority === "high"

// Case 2 — medium priority
$vars.ticket1.output.priority === "medium"

// Case 3 — low priority (or use Default to catch everything else)
$vars.ticket1.output.priority === "low"
// Case 1 — high priority
$vars.ticket1.output.priority === "high"

// Case 2 — medium priority
$vars.ticket1.output.priority === "medium"

// Case 3 — low priority (or use Default to catch everything else)
$vars.ticket1.output.priority === "low"

More specific conditions should appear first. A broader condition higher in the list will match before a more specific one below it.

Beispiele

Example 1 — Route by HTTP status code

FallAusdruckVerzweigung
Erfolgreich$vars.httpRequest1.output.statusCode === 200→ process response
Not Found$vars.httpRequest1.output.statusCode === 404→ handle missing resource
Standard(fallback)→ handle unexpected error

Example 2 — Route by string value

FallAusdruckVerzweigung
Genehmigt$vars.form1.output.status === "approved"→ continue process
Abgelehnt$vars.form1.output.status === "rejected"→ notify rejection
Anstehende$vars.form1.output.status === "pending"→ wait for review
Standard(fallback)→ handle unknown status

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