ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 76 - MCD - Level 1 discussion

Report
Export

A web client submits a request to http://localhost:8081?accountType=personal. The query parameter is captured using a Set Variable transformer to a variable named accountType.

What is the correct DataWeave expression to log accountType?

A.
Account Type: #[flowVars.accountType]
Answers
A.
Account Type: #[flowVars.accountType]
B.
Account Type: #[message.inboundProperties.accountType]
Answers
B.
Account Type: #[message.inboundProperties.accountType]
C.
Account Type: # [attributes.accountType]
Answers
C.
Account Type: # [attributes.accountType]
D.
Account Type: #[vars.accountType]
Answers
D.
Account Type: #[vars.accountType]
Suggested answer: D

Explanation:

vars: Keyword for accessing a variable, for example, through a DataWeave expression in a Mule component, such as the Logger, or from an Input or Output parameter of an operation. If the name of your variable is myVar, you can access it like this: vars.myVar

Hence correct answer is Account Type: #[vars.accountType]

asked 18/09/2024
piera d'addelfio
33 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first