ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 75 - MCD - Level 1 discussion

Report
Export

Refer to the exhibit.

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

A.
0#[ payload = 'US' ]
Answers
A.
0#[ payload = 'US' ]
B.
#[ payload == 'US' J
Answers
B.
#[ payload == 'US' J
C.
#[ if(payload = 'US') J
Answers
C.
#[ if(payload = 'US') J
D.
#[ if(payload == 'US') ]
Answers
D.
#[ if(payload == 'US') ]
Suggested answer: B

Explanation:

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 routing option. The effect is to add conditional processing to a flow, similar to anif/then/elsecode block in most programming languages.

Only one of the routes in the Choice router executes, meaning that the first expression that evaluates totruetriggers that route's execution and the others are not checked. If none of the expressions aretrue, then the default route executes.

Properties of <when>

PropertyDescription

Expression (expression)

Expression in DataWeave language to evaluate input. If the expression evaluates totrue, this routing option is used:

<when expression='#[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.

asked 18/09/2024
lakshmi govindu
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first