Exam MCD - Level 1 All QuestionsBrowse all questions from this exam
Question 141

Refer to the exhibits. In the Choice router, the When expression for the domesticShipping route is set to “#[payload =’FR’]”

What is logged after the Choice router completes?

    Correct Answer: C

    The Choice router's When expression uses a single equal sign ('='), which is incorrect for DataWeave syntax in MuleSoft. The correct syntax to compare values in DataWeave is '=='. Therefore, the router's expression will cause a syntax error.

Discussion
dendarmOption: C

Will fail and throw dataweave error, the correct syntax for the when clause would be: payload == 'FR'

[Removed]

True, there should be a red circle with exclamation mark in the picture. The image was edited...

ExamDevOption: B

Will fail and throw dataweave error, the correct syntax for the when clause would be: payload == 'FR'

Alandt

You mean C, right?

ibrahim_akbiyikOption: C

To compare, DataWeave syntax is #[payload == "FR"]. In this case only one = is used so it will give syntax error.

RanjansinghOption: B

B syntax error, tested locally

Ranjansingh

Typo error, it's C - Syntax error (not B)