MuleSoft
MCD-LEVEL-1 · Question #166
Refer to the exhibits. This main mule application calls a separate flow called as ShippingAddress which returns the address corresponding to the name of the user sent to it as input. Output of this…
The correct answer is A. 1. {. 2. orderkey: "payload.order", 3. addresskey: "vars.address" 4. }. Correct answer is as below. In this case address will be stored in a variable. Hence payload will not be overwritten and will contain order details orderkey: "payload.order", addresskey: "vars.address"
Use DataWeave to transform data
Question
Refer to the exhibits. This main mule application calls a separate flow called as ShippingAddress which returns the address corresponding to the name of the user sent to it as input. Output of this ShippingAddress is stored in a target variable named address. Next set of requirement is to have a setPayload transformer which will set below two values 1) orderkey which needs to set to be equal to the order element received in the original request payload. 2) addressKey which needs to be set to be equal to the address received in response of ShippingAddress flow What is the straightforward way to properly configure the Set Payload transformer with the required data? A mule application is being developed which will process POST requests coming from clients containing the name and order information. Sample request is as below A. 1. 1. { 2. 2. orderkey: "payload.order", 3. 3. addresskey: "vars.address" 4. 4. } B. 1. 1. { 2. 2. orderkey: "attributes.shippingaddress.order", 3. 3. addresskey: "payload" 4. } C. 1. 1. { 2. 2. orderkey: "payload.order", 3. 3. addresskey: "address" 4. } D. 1. 1. { 2. 2. orderkey: "attributes.order", 3. 3. addresskey: "vars.address" 4. }
Exhibit
Options
- A
- {. 2. orderkey: "payload.order", 3. addresskey: "vars.address" 4. }
- B
- {. 2. orderkey: "attributes.shippingaddress.order", 3. addresskey: "payload" 4. }
- C
- {. 2. orderkey: "payload.order", 3. addresskey: "address" 4. }
- D
- {. 2. orderkey: "attributes.order", 3. addresskey: "vars.address" 4. }
How the community answered
(23 responses)- A74% (17)
- B4% (1)
- C9% (2)
- D13% (3)
Explanation
Correct answer is as below. In this case address will be stored in a variable. Hence payload will not be overwritten and will contain order details orderkey: "payload.order", addresskey: "vars.address"
Topics
#DataWeave#target variable#vars#payload mapping
Community Discussion
No community discussion yet for this question.
