UiPath-ADAv1 Control Flow Practice Question
A developer is configuring a Switch activity to route a workflow based on a string variable named orderStatus. The variable can hold 'New', 'Processing', or 'Shipped'. The developer sets TypeArgument to String and adds cases for 'New' and 'Processing'. A test run shows that when orderStatus is 'Shipped', the workflow takes the Default case, but the developer expected an error or at least a distinct handling path. What is the correct explanation of this behavior?
⚠ Common exam trap
The trap here is expecting Switch to fault on an unmatched value, when in fact unmatched values are intentionally absorbed by the Default case.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Switch routes unmatched values to the Default case, which executes when no Case matches the expression; to handle 'Shipped' distinctly, a Case for that value must be added.
The Switch activity compares its expression to each Case and executes the first match; when nothing matches, the Default case runs. With only 'New' and 'Processing' defined, 'Shipped' legitimately lands in Default. The remedy is to add an explicit Case for 'Shipped' so it gets its own branch, while keeping Default as a safety net for values that were never anticipated.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Switch raises a runtime exception whenever the expression does not match any defined Case, so the Default case could not have executed.
Why it's wrong here
Switch does not throw for unmatched values; it quietly executes the Default case. An exception would only occur for type mismatches or null expressions that violate the TypeArgument, not for a valid string with no matching Case. The observed Default behavior is therefore normal, and the described exception would contradict what the test run actually showed.
- ✗
The TypeArgument must be set to Object for Switch to compare string values, so the Default case ran because String is an invalid TypeArgument.
Why it's wrong here
String is a perfectly valid TypeArgument for Switch, and it is the correct choice for comparing text values such as orderStatus. Setting TypeArgument to Object would still work but would forgo type safety at design time. The Default case executed because no Case matched 'Shipped', not because of any TypeArgument problem, so this explanation misdiagnoses the cause.
- ✓
Switch routes unmatched values to the Default case, which executes when no Case matches the expression; to handle 'Shipped' distinctly, a Case for that value must be added.
Why this is correct
Switch evaluates its expression once and compares it against each defined Case; if none matches, the Default case runs. Because 'Shipped' was never defined as a Case, it falls through to Default by design. This is expected behavior, not an error. Adding a Case with the value 'Shipped' gives that status its own path, and Default remains for genuinely unexpected values.
- ✗
Switch cases are evaluated in reverse order, so 'Shipped' matched the last defined Case and was then redirected to Default.
Why it's wrong here
Switch compares the expression against its Cases in the order they are listed and stops at the first match; there is no reverse evaluation. Since 'Shipped' was never defined as a Case at all, no match occurred and Default ran. This explanation invents an ordering rule that does not exist and also assumes a Case for 'Shipped' was present when it was not.
About these practice questions
One of 285 original UiPath-ADAv1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official UiPath exam blueprint
This UiPath-ADAv1 practice question is part of Courseiva's free UiPath certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the UiPath-ADAv1 exam.