nerdexam
MuleSoft

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…

Mule 4 Application Development

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)
  • A
    15% (4)
  • B
    4% (1)
  • C
    4% (1)
  • D
    77% (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

#DataWeave#vars expression#Set Variable#Mule 4 syntax

Community Discussion

No community discussion yet for this question.

Full MCD-LEVEL-1 Practice