A Set Variable component saves the current payload to a variable.
What is the DataWeave parent expression to access the variable?
A Set Variable component saves the current payload to a variable.
What is the DataWeave parent expression to access the variable?
To access a variable in DataWeave, you use the 'vars' keyword. The syntax to access a specific variable would be #[vars.variableName]. This is the standard way to refer to variables set in a Mule event.
https://docs.mulesoft.com/dataweave/2.4/dataweave-variables-context vars All variables currently set on the current Mule event being processed. Fields: No fields. Example: #[vars.myVar] returns the value of myVar.
https://docs.mulesoft.com/dataweave/2.4/dataweave-variables
var in that case is a reserved keyword from JAVA
Mule4 -> vars
OPTION "B" IS CORRECT.
Try it out in Studio :) It's vars, so "B"
vars. letter b
it is B. Vars
B is correct
vars is correct
#[vars.{nameOfVaraible}] Example: #[vars.myVar] => returns the value of myVar.