Exam Mule-Dev-201 Topic 1 Question 42 Discussion
Actual exam question for Salesforce's Mule-Dev-201 exam
Question #: 42
Topic #: 1
Question #: 42
Topic #: 1
Refer to the exhibit.

What is a valid expression for the Choice router's when expression to route events to the documenticShipping flow?

What is a valid expression for the Choice router's when expression to route events to the documenticShipping flow?
Suggested Answer: B Vote an answer
Choice Router
The Choice router dynamically routes messages through a flow according to a set of DataWeave expressions that evaluate message content. Each expression is associated with a different routingoption. The effect is to add conditional processing to a flow, similar to an if/then/else code block in most programming languages.
Only one of the routes in the Choice router executes, meaning that the first expression that evaluates to true triggers thatroute's execution and the others are not checked. If none of the expressions are true, then the default route executes.
Properties of <when>
PropertyDescription
Expression (expression)
Expression in DataWeave language to evaluate input.If the expressionevaluates to true, this routing option is used:
* <whenexpression="#[vars.language == 'Spanish']">
Mulesoft Doc Ref : https://docs.mulesoft.com/mule-runtime/4.3/choice-router-concept With respect to above information , Option 1 is the correct syntax as others are incorrect because of below reasons
* Single = is not the correct syntax to validate the condition. It should be ==
* If keyword is not required in when condition.
The Choice router dynamically routes messages through a flow according to a set of DataWeave expressions that evaluate message content. Each expression is associated with a different routingoption. The effect is to add conditional processing to a flow, similar to an if/then/else code block in most programming languages.
Only one of the routes in the Choice router executes, meaning that the first expression that evaluates to true triggers thatroute's execution and the others are not checked. If none of the expressions are true, then the default route executes.
Properties of <when>
PropertyDescription
Expression (expression)
Expression in DataWeave language to evaluate input.If the expressionevaluates to true, this routing option is used:
* <whenexpression="#[vars.language == 'Spanish']">
Mulesoft Doc Ref : https://docs.mulesoft.com/mule-runtime/4.3/choice-router-concept With respect to above information , Option 1 is the correct syntax as others are incorrect because of below reasons
* Single = is not the correct syntax to validate the condition. It should be ==
* If keyword is not required in when condition.
by Meredith at Jun 28, 2026, 10:45 PM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).