MCD-LEVEL-1 · Question #41
parameter is captured using a Set Variable transformer to a variable named accountType. What is the correct DataWeave expression to log accountType?
The correct answer is D. Account Type: #[vars.accountType]. 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…
Question
parameter is captured using a Set Variable transformer to a variable named accountType. What is the correct DataWeave expression to log accountType?
Options
- AAccount Type: #[flowVars.accountType]
- BAccount Type: #[message.inboundProperties.accountType]
- CAccount Type: # [attributes.accountType]
- DAccount Type: #[vars.accountType]
How the community answered
(26 responses)- A15% (4)
- B4% (1)
- C4% (1)
- D77% (20)
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]
Topics
Community Discussion
No community discussion yet for this question.