Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Certified MuleSoft Developer (Mule-Dev-201) Exam - Topic 10 Question 21 Discussion

Posted by Mitsue on Nov 19, 2024 at 05:01 AM

Refer to the exhibits.

Set paylaod transformer is set the firstName and lastName of the customer as shown in below images.

What is the correct Dataweave expression which can be added in message attribute of a Logger activity to access firstName (which in this case is Madhav) from the incoming event?

Suggested Answer: D

Correct answer is vars.'customer'.'firstName'

Please note that you can also access firstName using this syntax vars.customer.firstName.

Mule Ref Doc :Variables in Mule Apps | MuleSoft Documentation


Get Premium Salesforce Certified MuleSoft Developer (Mule-Dev-201) Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
36 comments · newest first
EM
Emerson 11 months ago
Wait, why would we use vars for this? That seems off.
AN
Antonio 11 months ago
I agree with Mirta, B is the way to go!
LI
Lilli 12 months ago
I'm not so sure about that, seems too simple.
ST
Stephania 12 months ago
I think it's just firstName, right?
MI
Mirta 1 year ago
It's definitely customer.firstName!
SE
Sean 1 year ago
I think I saw something about using quotes in Dataweave expressions, so maybe D is the right choice?
LI
Linsey 1 year ago
I feel like I should know this, but I'm confused about whether to use vars or just access it directly.
SH
Shasta 1 year ago
I remember practicing a similar question where we had to access nested attributes. I wonder if it's C or D this time.
RO
Rolf 1 year ago
I think the answer might be B, but I'm not entirely sure if the context requires using "customer" like that.
KI
Kimberlie 1 year ago
I feel pretty confident about this one. The question is straightforward, and the images clearly show the payload structure with a "customer" object containing the firstName and lastName. I'm going to go with option B.
CA
Casandra 1 year ago
I'm not totally sure about this one. The question mentions a "Logger activity" but I'm not familiar with that. I'll have to think through the DataWeave syntax carefully to make sure I select the right option.
HE
Hector 1 year ago
Okay, I think I've got this. The key is that the question is asking for the correct DataWeave expression to access the firstName, which is "Madhav" based on the images. So the answer is B, "customer.firstName".
JE
Jeannetta 1 year ago
Hmm, I'm a bit confused by the question. It mentions a "Set paylaod transformer" but I don't see any information about that in the question. I'll need to re-read it carefully to make sure I understand what it's asking.
VI
Vilma 1 year ago
This looks straightforward, I think the answer is B. The question is asking for the correct DataWeave expression to access the firstName, and the image shows the payload has a "customer" object with firstName and lastName properties.
LU
Luther 2 years ago
I bet the correct answer is 'firstName' because the question is just testing if we can read. Seriously, who needs DataWeave when you have common sense?
HU
Huey 2 years ago
B) customer.firstName is the way to go. Unless you're trying to invoke the spirit of Shakespeare with those 'vars' shenanigans.
CA
Carli 2 years ago
↳ replying to Huey
A) firstName is too vague. B) customer.firstName is more specific.
TR
Trinidad 2 years ago
↳ replying to Huey
B) customer.firstName is correct. No need for the 'vars' confusion.
CA
Carol 2 years ago
I'm not sure, but I think C) vars.`customer.firstName` might also work because it combines vars and customer.firstName.
GL
Glenna 2 years ago
A) firstName? Really? Who names a variable just 'firstName'? That's like naming your dog 'Dog'. C'mon, people, get creative!
AZ
Azalee 2 years ago
↳ replying to Glenna
D) vars.customer.firstName
VI
Viola 2 years ago
↳ replying to Glenna
C) vars.customer.firstName
SH
Shasta 2 years ago
↳ replying to Glenna
B) customer.firstName
NO
Noah 2 years ago
↳ replying to Glenna
A) firstName? Really? Who names a variable just 'firstName'? That's like naming your dog 'Dog'. C'mon, people, get creative!
YO
Yolando 2 years ago
I disagree, I believe the correct answer is D) vars.`customer`.`firstName` because it uses the vars to access the customer's firstName.
PA
Paulene 2 years ago
D) vars.customer.firstName looks more elegant, but B) is the safer bet. Gotta play it safe in these exams, you know.
TO
Toshia 2 years ago
I think the correct answer is B) customer.firstName. It's a pretty straightforward data mapping, no need to overcomplicate things.
SH
Sherita 2 years ago
↳ replying to Toshia
I'm not sure, but A) firstName seems too simple to be the correct answer.
JE
Jeannetta 2 years ago
↳ replying to Toshia
I believe it's D) vars.`customer`.`firstName` to access the nested property.
LA
Lashawn 2 years ago
↳ replying to Toshia
D) vars.customer.firstName
HE
Heike 2 years ago
↳ replying to Toshia
I think it's C) vars.`customer.firstName` because we need to access it through vars.
AL
Alline 2 years ago
↳ replying to Toshia
C) vars.customer.firstName
DO
Dominic 2 years ago
↳ replying to Toshia
I agree, B) customer.firstName seems like the correct answer.
TA
Tawanna 2 years ago
↳ replying to Toshia
B) customer.firstName
SA
Sanjuana 2 years ago
↳ replying to Toshia
A) firstName
CA
Catarina 2 years ago
I think the correct answer is B) customer.firstName because it directly accesses the firstName of the customer.
0/2000 characters

Save Cancel