Courseiva

CCNA Control Flow Questions

25 questions · Control Flow · All types, answers revealed

1
MCQmedium

In a Parallel activity containing three branches, Branch A completes in 2 seconds, Branch B completes in 10 seconds, and Branch C completes in 5 seconds. When does the workflow proceed to the activity immediately following the Parallel container?

A.As soon as Branch A completes after 2 seconds.
B.Only after Branch B completes after 10 seconds.
C.Exactly 17 seconds after the activity starts, representing the sum of all branches.
D.Immediately, because the Parallel activity runs branches in separate background threads.
AnswerB

Because Branch B is the longest-running task, it determines the total duration of the Parallel activity. The container waits for the completion of every branch, including the slowest one, before it is considered finished. This behavior is fundamental to the 'Join' logic of parallel processing in UiPath, ensuring that no background tasks are left dangling before proceeding.

Why this answer

The Parallel activity is designed to execute multiple child activities simultaneously in a non-blocking manner. However, the container itself is synchronous regarding the main workflow. It will only pass control to the subsequent activity once all internal branches have finished their execution.

This ensures that all parallel tasks are fully synchronized before the automation moves forward to steps that might depend on their outputs.

2
Multi-Selectmedium

A developer is configuring a Switch activity. Which THREE data types are valid for the 'TypeArgument' property? (Select THREE)

Select 3 answers
A.Int32
B.String
C.Boolean
D.DataTable
E.Dictionary
AnswersA, B, C

The Int32 type is a standard selection for Switch activities, often used for status codes, counts, or menu selections. It allows the developer to define cases based on whole numbers. This is one of the most efficient types for the Switch activity to process because numeric comparisons are computationally simple and very common in programmatic decision-making logic.

Why this answer

The Switch activity is versatile and supports various data types for its evaluation expression. The TypeArgument property defines what kind of data the activity will compare. Common types include Int32, String, and Boolean.

By selecting the correct TypeArgument, developers can ensure that the case values are correctly typed and compared against the input expression, allowing for flexible logic based on different types of process data.

Exam trap

Test-takers often confuse supported basic data types with complex structures or UI element types when configuring the TypeArgument property of a Switch activity.

3
MCQmedium

You are building a process that iterates through a list of invoice files. If a file is missing required metadata, the process must skip that specific file and continue to the next one without stopping. Which activity is the most efficient choice for this requirement?

A.Break activity
B.Throw activity
C.Continue activity
D.If activity with an empty Then block
AnswerC

The Continue activity directs the workflow to jump immediately to the next iteration of the parent loop. This allows the process to ignore the remaining instructions for the current invoice item while seamlessly moving to the next file, fulfilling the requirement for efficient skipping during bulk processing.

Why this answer

The Continue activity is specifically designed to bypass the remaining steps within the current iteration of a loop, such as a For Each or While activity. By using Continue, the automation ensures that the workflow logic immediately jumps to the next item in the collection, preventing unnecessary execution of the remaining body activities. This pattern is critical for error handling within bulk processing tasks.

Exam trap

Candidates might incorrectly choose 'Break' instead of 'Continue', causing the entire automation to stop processing the remaining files instead of just skipping the one missing metadata.

4
MCQmedium

In an 'If' activity, what happens if the 'Condition' evaluates to 'True' but the 'Then' branch is empty?

A.The workflow throws a Validation Error because both branches must contain at least one activity.
B.The 'Else' branch is executed as a fallback.
C.The workflow proceeds to the activity following the 'If' block without doing anything.
D.The workflow execution pauses and logs a warning in the Output panel.
AnswerC

This is the standard behavior. Since the condition was True, the engine entered the 'Then' block, found no work to do, and concluded the 'If' activity. It then naturally moves to the next activity in the sequence. This is a common occurrence during development when a developer has not yet implemented the logic for a specific condition.

Why this answer

The 'If' activity is a fundamental control flow component. If the condition is met (True), the workflow engine looks into the 'Then' block. If that block contains no activities, the workflow simply skips that branch and proceeds to the next activity following the 'If' container.

This does not cause an error; it simply means no actions were defined for that specific logical outcome.

Exam trap

Candidates often believe that an empty 'Then' branch will cause a validation error or a runtime exception, rather than simply allowing the workflow to continue silently to the next step.

5
MCQhard

A developer builds a State Machine inside a UiPath project. From the 'Idle' state, a transition fires when the variable retryCount is greater than 3, moving execution to the 'HandleFailure' state. Later, while already in the 'HandleFailure' state, the same condition (retryCount > 3) becomes true again. What happens next?

A.The transition from 'Idle' fires again because the condition is still true, and execution returns to 'Idle' before re-evaluating.
B.The State Machine automatically terminates with a BusinessRuleException because a condition cannot be evaluated twice with the same result.
C.Execution remains in 'HandleFailure' indefinitely and no further transitions are evaluated until an external trigger resets the machine.
D.The transition associated with the 'HandleFailure' state that matches the condition is evaluated, and execution may move to another state or re-enter 'HandleFailure' depending on the transition's target.
AnswerD

In a State Machine, each state has its own set of transitions. Once execution enters 'HandleFailure', the transitions defined on that state are evaluated, not the transitions of 'Idle'. If a transition on 'HandleFailure' matches retryCount > 3, it fires and execution follows its target, which could be another state or even 'HandleFailure' again, producing a controlled loop.

Why this answer

A State Machine evaluates the transitions attached to whichever state is currently active. After moving from 'Idle' to 'HandleFailure', the 'Idle' transitions no longer participate; only 'HandleFailure' transitions are checked. If one of those transitions matches retryCount > 3, it fires and directs execution to its target, which may be a different state or 'HandleFailure' itself, enabling intentional looping or recovery paths.

Exam trap

The trap here is assuming that a transition's condition is globally monitored, when in fact transitions belong to the state they originate from and are only evaluated while that state is active.

6
MCQeasy

A developer wants to pause the execution of a workflow for exactly 5 seconds. Which activity is the best practice to use for this purpose in UiPath Studio?

A.Wait For Element
B.Delay
C.Invoke Code with 'Thread.Sleep(5000)'
D.Wait
AnswerB

The Delay activity is specifically designed to pause the execution for a set duration. It is highly configurable and is the standard tool for adding wait times in a process. Using Delay is considered best practice because it is explicit, visible in the workflow designer, and does not require writing custom code or scripts to achieve a simple pause.

Why this answer

The Delay activity is the standard and recommended way to introduce a pause in a UiPath workflow. It is easy to configure using a TimeSpan format (HH:mm:ss). Unlike coding-heavy alternatives, it is a built-in activity that is easily readable for other developers and integrates perfectly with the UiPath execution engine, ensuring the robot waits the specified duration before moving to the next task.

Exam trap

Candidates often incorrectly suggest using a 'While' loop with a timer or a 'Message Box' to pause execution, failing to recognize the 'Delay' activity as the standard built-in solution.

7
MCQeasy

A developer needs to repeat a set of activities for every row returned by a Data Table named dtInvoices. The order of processing is important, and each row must be fully processed before the next begins. Which activity should the developer use, and why?

A.While, because it can loop until the Data Table is empty.
B.Parallel For Each, because it is faster for Data Table rows.
C.For Each, because it iterates the collection sequentially in index order.
D.Do While, because it guarantees at least one iteration even for an empty table.
AnswerC

For Each walks the collection in index order and completes each iteration before starting the next, which satisfies the requirement that rows be processed in order and one at a time. It is the standard choice for deterministic, sequential iteration over a Data Table or any IEnumerable.

Why this answer

Sequential, ordered iteration over a collection is the purpose of For Each; it processes items in index order and finishes each before moving on. Parallel For Each sacrifices order for concurrency, and the While and Do While loops demand manual indexing and termination logic while offering no native enumeration of a Data Table.

Exam trap

The trap here is choosing the parallel iterator for speed when the requirement explicitly demands that each row finish before the next starts, which concurrency cannot guarantee.

8
MCQmedium

A developer builds a Sequence that reads a queue item's transaction data, then must decide whether the invoice total exceeds 10,000. If it does, the workflow should assign the item to a senior approver; otherwise it should post it to the standard approval queue. The developer wants the fewest activities and a clear two-way decision at this point in the Sequence. Which control flow activity should be used?

A.While
B.Flow Decision
C.Switch
D.If
AnswerD

The If activity evaluates a Boolean Condition and routes execution into exactly one of two branches, Then or Else. A single comparison such as invoiceTotal > 10000 fits this two-outcome decision perfectly, and the two branches map directly onto the senior-approver versus standard-approval paths. It also keeps the Sequence readable, since no extra container or default-case handling is required for a simple true/false split.

Why this answer

A single Boolean comparison with two mutually exclusive outcomes is the canonical use of the If activity. It evaluates the Condition once and executes only the matching branch, so the senior-approver and standard-approval paths stay separate and readable. Switch and Flow Decision add unnecessary routing structure, and While is a looping construct rather than a branch, so it cannot satisfy a one-time decision inside a Sequence.

Exam trap

The trap here is assuming that any activity capable of two-way branching, such as Flow Decision, can be substituted freely for If regardless of whether the surrounding container is a Sequence or a Flowchart.

9
Multi-Selectmedium

Which THREE properties are commonly used and configured in a 'For Each' activity to manage the iteration process? (Select THREE)

Select 3 answers
A.Values
B.TypeArgument
C.Index
D.Timeout
E.ContinueOnError
AnswersA, B, C

The 'Values' property is the input for the For Each activity. It must be a collection, such as a List, Array, or DataTable rows. Without specifying the collection in this property, the activity has nothing to iterate through. It is the most critical property as it defines the scope and source of the data for the entire loop operation.

Why this answer

The For Each activity requires specific configurations to function correctly. The 'Values' property defines the collection to iterate over, 'TypeArgument' specifies the data type of the items, and 'Index' (or 'CurrentIndex' in newer versions) provides a way to track the current position in the loop. Mastering these properties allows developers to accurately process data collections and maintain control over the loop's state.

Exam trap

Candidates often confuse the 'TypeArgument' property with the variable type of the collection itself, leading to errors when the loop cannot correctly iterate through items.

10
MCQmedium

A developer processes a DataTable of expense records inside a For Each Row activity. For each row, the workflow must check the 'Amount' column, and when the amount exceeds the configured limit, it should immediately stop processing any further rows and continue with the activities that follow the loop. Which activity should be placed inside the loop body to achieve this?

A.Break
B.Throw
C.Terminate Workflow
D.Continue
AnswerA

Break terminates the innermost loop immediately and transfers control to the activity that follows the loop. Placing it inside the conditional block for amounts above the limit stops the For Each Row on the offending record, so no later rows are processed. This matches the requirement to halt iteration and proceed with the post-loop activities in the same Sequence.

Why this answer

Break exits the innermost enclosing loop at once and resumes execution at the first activity after that loop. In a For Each Row over expense records, placing Break inside the amount check halts iteration on the first over-limit row while allowing the workflow to proceed normally afterward. Continue, Throw, and Terminate Workflow either keep looping, fault the process, or end the whole automation, so none matches the requirement.

Exam trap

The trap here is confusing Break with Continue, since both alter loop execution, but only Break exits the loop while Continue merely advances to the next iteration.

11
Multi-Selecthard

A developer is building a workflow that reads rows from a DataTable and, for each row, must decide whether to process the row or skip it based on a status column. The developer wants to use a For Each Row activity and control the loop from inside its body. Which TWO activities can be placed inside the For Each Row body to alter the normal iteration? (Choose two.)

Select 2 answers
A.Break
B.Continue
C.Throw
D.Terminate Workflow
E.Delay
AnswersA, B

The Break activity immediately terminates the innermost loop in which it is placed. Inside a For Each Row body, placing Break causes the loop to stop processing further rows and execution continues with the activity that follows the loop. This is one of the two activities in the scenario that can alter normal iteration, satisfying the requirement to exit the loop early based on a condition.

Why this answer

Break and Continue are the two loop-control activities that can be placed inside a For Each Row body to change iteration behavior. Break exits the loop entirely, while Continue skips the rest of the current iteration and moves to the next row. Terminate Workflow, Throw, and Delay do not provide this kind of iteration control and would either end the process, raise an error, or simply pause execution.

Exam trap

The trap here is confusing activities that stop the whole workflow, such as Terminate Workflow, with activities that only affect the current loop, such as Break and Continue.

12
MCQhard

A developer places a Break activity inside an If block that is nested within a For Each loop. The If block also contains a Log Message activity after the Break. What happens when the condition in the If block evaluates to True?

A.The Log Message activity executes, and the For Each loop continues with the next item.
B.The For Each loop exits immediately, and the Log Message activity is skipped.
C.The workflow throws an exception because Break is used inside an If block.
D.The Log Message activity executes, and then the For Each loop exits.
AnswerB

Break immediately terminates the innermost loop that contains it. Any activities placed after Break within the same block, including the Log Message, are not executed because control jumps out of the loop right away. Execution resumes with the activity that follows the For Each loop, which matches this option exactly.

Why this answer

Break transfers control out of the innermost loop immediately, so any activities after it in the same block, such as the Log Message, do not execute. The loop does not continue to the next item, and no exception is thrown because Break inside an If block within a loop is valid. The other options confuse Break with Continue or misstate its rules.

Exam trap

The trap here is mixing up Break and Continue, or assuming that activities placed after Break in the same block still run before the loop exits.

13
MCQeasy

While iterating through a list of 10 items using a 'For Each' activity, a developer uses a 'Continue' activity inside an 'If' block that checks if the current item is equal to 5. What happens when the loop reaches the 5th item?

A.The loop terminates immediately and no further items are processed.
B.The 5th item is processed, and then the loop stops.
C.The remaining activities in the loop for the 5th item are skipped, and the loop proceeds with the 6th item.
D.The 5th item is skipped and the loop restarts from the 1st item.
AnswerC

This is the correct technical definition of the 'Continue' activity. It acts as a shortcut to the end of the current loop iteration. By using it, the developer ensures that the logic for the 5th item is aborted mid-way, and the 'For Each' mechanism immediately moves to fetch the next item (the 6th) and begins a new iteration.

Why this answer

The Continue activity is used to skip the remaining activities within the current iteration of a loop and immediately jump to the next iteration. In this scenario, when the item is 5, the activities following the If block inside the loop are ignored, and the loop starts again with the 6th item. This is a standard way to bypass specific items that do not meet certain criteria.

Exam trap

Candidates often mistakenly believe 'Continue' terminates the entire loop execution or that it resets the loop index, rather than simply skipping the remaining activities for the current item only.

14
MCQhard

A developer implements a 'Pick' activity with two 'PickBranch' activities. Branch A has a 'Click' activity as a trigger, and Branch B has a 'Delay' activity set to 30 seconds as a trigger. If the user clicks the element after 10 seconds, what happens?

A.Branch A executes its action, and Branch B is cancelled.
B.Both Branch A and Branch B execute their actions since both triggers were eventually met.
C.Branch B executes its action after 30 seconds because it was already scheduled.
D.The Pick activity throws an exception because two triggers cannot run simultaneously.
AnswerA

Since the 'Click' in Branch A occurred at 10 seconds, it beat the 30-second 'Delay' in Branch B. The Pick activity identifies Branch A as the winner, executes its 'Action' sequence, and immediately cancels the 'Delay' in Branch B. This prevents the workflow from waiting the full 30 seconds, allowing for more responsive and efficient automation behavior.

Why this answer

The Pick activity is a control flow activity that waits for one of its branches' triggers to be satisfied. As soon as the first trigger completes, that branch's action is executed, and all other branches are cancelled. This 'race' condition is perfect for handling timeouts or UI events where you only want to proceed with the first event that occurs, ensuring the robot doesn't wait unnecessarily.

Exam trap

Candidates often assume that once a Pick activity starts, all branches will eventually finish executing, missing the core 'race condition' behavior where the first completed trigger cancels all other branches.

15
MCQmedium

A developer needs a workflow that waits for either an incoming email or a file to appear in a folder, whichever happens first, and then performs a different action for each case. The developer wants to avoid polling both conditions repeatedly. Which activity should be used to model this behavior?

A.Parallel
B.Pick
C.While
D.Switch
AnswerB

The Pick activity contains multiple PickBranch activities, each with a trigger and an action. Execution waits until the first trigger completes, runs that branch's action, and cancels the remaining branches. This exactly models the scenario where the workflow should proceed as soon as either the email arrives or the file appears, without waiting for both conditions.

Why this answer

The Pick activity is purpose-built for waiting on multiple triggers and continuing with the first one that completes, cancelling the others. That matches the requirement to react to either an incoming email or a new file without polling. Parallel waits for all branches, Switch routes on a value, and While requires manual polling, so none of them provide the desired behavior.

Exam trap

The trap here is assuming that Parallel will continue as soon as the first branch finishes, when in fact Parallel waits for all branches to complete before moving on.

16
MCQmedium

A developer is using a Switch activity to route a workflow based on a 'Status' string variable. If the variable contains 'In Progress' but no case is defined for this value, what is the expected behavior of the activity?

A.The workflow will throw a Runtime Execution Error indicating no case match.
B.The activity will be skipped entirely and move to the next activity in the sequence.
C.The workflow will execute the activities defined within the Default case.
D.The Switch activity will pause and wait for manual user intervention to select a path.
AnswerC

The Default case acts as a catch-all mechanism for any input that does not satisfy the conditions of the specific cases defined by the developer. By placing logic here, developers can ensure that even unhandled strings like 'In Progress' result in a controlled action, such as logging a warning or setting a fallback status before the process continues.

Why this answer

The Switch activity evaluates the expression and executes the activities within the matching case. When no match is found between the expression result and the predefined cases, the workflow executes the activities located in the Default section. This ensures that the automation handles unexpected input gracefully without failing, which is critical for maintaining robust and predictable control flow in production environments.

Exam trap

Many candidates mistakenly believe a Switch activity will throw an unhandled runtime error if a matching case is missing, overlooking the built-in fallback behavior of the Default case.

17
MCQeasy

A developer wants a set of activities to execute sequentially, one after another, and also wants to be able to collapse that group into a single labeled block on the designer canvas for readability. The activities share the same variables and do not require any conditional or parallel behavior. Which container should the developer use?

A.Sequence
B.Flowchart
C.State Machine
D.Parallel
AnswerA

A Sequence executes its children in the exact order they appear, top to bottom, and it can be collapsed on the canvas with an editable DisplayName. It supports shared variables declared in its Variables panel, so the grouped activities keep their scope. Since no branching or concurrency is needed, Sequence is the simplest container that satisfies both the execution order and the readability requirement.

Why this answer

Sequence is the container for straight-line execution: children run top to bottom, variables can be shared across the group, and the whole block can be collapsed and renamed for clarity on the designer. Because the scenario forbids conditional and parallel behavior, the branching-oriented Flowchart and State Machine and the concurrent Parallel container are all unnecessary or actively wrong for this requirement.

Exam trap

The trap here is reaching for Parallel or Flowchart as a general-purpose grouping container when the requirement is plain ordered execution with no branching or concurrency.

18
MCQhard

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?

A.Switch raises a runtime exception whenever the expression does not match any defined Case, so the Default case could not have executed.
B.The TypeArgument must be set to Object for Switch to compare string values, so the Default case ran because String is an invalid TypeArgument.
C.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.
D.Switch cases are evaluated in reverse order, so 'Shipped' matched the last defined Case and was then redirected to Default.
AnswerC

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.

Why this answer

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.

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.

19
MCQmedium

A developer has nested a 'For Each' loop (InnerLoop) inside another 'For Each' loop (OuterLoop). If a 'Break' activity is placed inside InnerLoop, what happens when it is executed?

A.Both InnerLoop and OuterLoop are immediately terminated.
B.Only InnerLoop is terminated, and OuterLoop continues to its next iteration.
C.The current iteration of InnerLoop is skipped, but InnerLoop continues with the next item.
D.The workflow throws an exception because 'Break' is not supported in nested loops.
AnswerB

This is the standard behavior of the Break activity in UiPath. It exits the 'InnerLoop' and returns control to the 'OuterLoop' scope. The 'OuterLoop' then continues with the next element in its collection. This is useful for searching for a specific item within a subset and then moving on to the next major category in the data set.

Why this answer

The Break activity is designed to immediately terminate the execution of the innermost loop that contains it. In a nested scenario, it only exits the scope of the current loop level. The outer loop is unaffected and will proceed to its next iteration.

This behavior allows developers to stop processing specific sub-items once a condition is met while still continuing the overall process for the remaining parent items.

Exam trap

Candidates frequently assume that a 'Break' activity will exit the entire nested loop structure, failing to realize it only impacts the immediate container in which it is placed.

20
MCQhard

A developer is using a 'Parallel For Each' activity to process items in a list. How does this activity differ from a standard 'For Each' activity in terms of execution?

A.It executes each iteration one after another but in a random order.
B.It creates a separate Windows thread for every item in the collection to ensure true parallelism.
C.It executes all iterations asynchronously and completes when all of them have finished.
D.It only executes the first three items in parallel and the rest sequentially to save memory.
AnswerC

This is the core behavior of Parallel For Each. It starts the execution of all items in the collection without waiting for the previous one to finish. The container remains active until every single iteration has concluded its work. This is ideal for scenarios where the robot is waiting on multiple independent web requests or UI elements that can be handled concurrently.

Why this answer

The Parallel For Each activity schedules the processing of all items in a collection simultaneously rather than sequentially. While it does not truly run in multiple threads (due to the single-threaded nature of the workflow engine), it allows activities that involve waiting (like UI interactions or delays) to overlap. This can significantly reduce total execution time for tasks that are not CPU-bound but involve external waiting.

Exam trap

Developers often assume Parallel For Each runs truly multithreaded operations across independent CPU cores, forgetting the single-threaded nature of the UiPath expression evaluation engine.

21
Multi-Selectmedium

In UiPath Studio, which TWO activities are only available for use within a Flowchart container and not a Sequence? (Select TWO)

Select 2 answers
A.Flow Decision
B.Switch
C.Flow Switch
D.Pick
E.Assign
AnswersA, C

The Flow Decision is a core Flowchart activity that uses a diamond shape to represent a boolean branch. It cannot be dragged into a Sequence because it relies on the connection-based architecture of Flowcharts to link to other activities. In a Sequence, the equivalent logic must be implemented using the standard 'If' activity, which uses a different container-based structure.

Why this answer

Flowcharts offer specific activities that leverage their non-linear, graphical nature. While many activities are shared between Sequences and Flowcharts, 'Flow Decision' and 'Flow Switch' are unique to Flowcharts. They utilize the visual arrows and nodes of the Flowchart designer to direct the flow, which is fundamentally different from the nested, linear structure of a Sequence where these specific activities cannot function.

Exam trap

Candidates frequently assume that all control flow activities are interchangeable between Sequences and Flowcharts, failing to realize that Flow-specific activities rely on visual node connections.

22
MCQhard

Refer to the exhibit. If the 'ProcessData' state encounters an 'Error' transition, what is the sequence of execution regarding the State Machine's completion?

A.The State Machine restarts from the Initial state to attempt a retry.
B.The Entry activity of 'FinalState' executes, and the State Machine finishes.
C.The State Machine enters a suspended state until the error is manually cleared.
D.The 'ProcessData' state's Entry activities are re-executed before transitioning.
AnswerB

This is the correct flow for a State Machine reaching a Final State. Upon the 'Error' transition, the State Machine enters 'FinalState', executes its Entry activities (closing the connection), and then terminates. Because a Final State cannot have transitions, it effectively marks the end of the state machine's execution logic before returning control to the parent workflow.

Why this answer

In a State Machine, transitions determine the move from one state to another. When the 'Error' transition is triggered in 'ProcessData', the workflow immediately moves to the 'FinalState'. A Final State is a special type of state that does not allow any outgoing transitions.

Once the Entry activities of the Final State are completed, the entire State Machine activity finishes execution and the workflow continues.

Exam trap

Candidates often incorrectly believe that reaching a Final State causes the entire workflow to crash or immediately abort without executing the state's entry actions.

23
MCQmedium

A developer builds a Process that reads a queue of transaction items. For each item, an HTTP request must be sent and the response logged. To reduce overall execution time, the developer wants several items processed simultaneously within a single automation, while still allowing each iteration to run its own sequence of activities. Which control-flow construct should the developer place around the per-item sequence to achieve this?

A.While
B.Parallel For Each
C.Parallel
D.For Each
AnswerB

Parallel For Each iterates a collection and starts each item's body concurrently on separate threads, so multiple HTTP requests can be in flight at once and total runtime drops. Each iteration still runs its own sequence of activities, matching the requirement to process several items simultaneously within one automation rather than sequentially.

Why this answer

Concurrent per-item work inside one automation is delivered by Parallel For Each, which launches iterations on separate threads while preserving the per-item activity sequence. A standard For Each is sequential, While is condition-driven and sequential, and Parallel operates on a fixed set of branches rather than a collection. Only the parallel iterator reduces wall-clock time across many independent HTTP calls.

Exam trap

The trap here is assuming any activity with 'Parallel' in its name iterates a collection, when Parallel takes a fixed set of branches and Parallel For Each is the one that iterates items.

24
Multi-Selecteasy

A developer needs to iterate through a list of transactions. Which TWO characteristics distinguish a While activity from a Do While activity? (Select TWO)

Select 2 answers
A.A While activity checks the condition before executing the activities in the Body.
B.A Do While activity can only be used within a Flowchart, not a Sequence.
C.A Do While activity ensures the activities in the Body are executed at least once.
D.A While activity automatically increments an index variable, while Do While does not.
E.While activities support 'Break' while Do While activities do not support it.
AnswersA, C

In a While loop, the boolean expression is evaluated first. If the condition is false initially, the activities inside the Body block are skipped entirely. This is useful when you only want to process data if a certain prerequisite is met, such as checking if a list is not empty before attempting to access its items.

Why this answer

While and Do While are both used for looping based on a boolean condition, but they differ in their execution order. A While activity checks the condition at the start, meaning it might never run the body. A Do While activity checks the condition at the end, ensuring at least one execution.

Understanding these differences is vital for avoiding logic errors where a loop should or should not run.

Exam trap

Test-takers frequently mix up the execution order, incorrectly assuming a standard While loop guarantees at least one execution of its body just like a Do While loop.

25
MCQeasy

A developer is configuring an If activity to check whether a string variable named Status equals "Approved". The developer wants the Then branch to execute only for that exact value. Which expression should be placed in the Condition property?

A.Status.Equals("Approved", StringComparison.OrdinalIgnoreCase)
B.Status.Contains("Approved")
C.Status = "Approved"
D.Status == "Approved"
AnswerC

In UiPath expressions, the single equals sign is the equality operator, so Status = "Approved" evaluates to a Boolean and returns True only when the variable contains exactly that text. This is the correct syntax for the If activity Condition property in this scenario, and it satisfies the requirement that the Then branch run only for the exact value.

Why this answer

UiPath uses Visual Basic expression syntax, where a single equals sign performs equality comparison. The expression Status = "Approved" returns True only when the variable exactly matches the specified text, which is precisely what the scenario requires. The other options either use invalid syntax for UiPath or perform broader comparisons that would trigger the Then branch for unintended values.

Exam trap

The trap here is assuming that UiPath expressions follow C-style syntax and that double equals is required for equality, when UiPath actually uses Visual Basic syntax with a single equals sign.

Ready to test yourself?

Try a timed practice session using only Control Flow questions.