Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam MCD - Level 1 All Questions

View all questions & answers for the MCD - Level 1 exam

Exam MCD - Level 1 topic 1 question 104 discussion

Actual exam question from Mulesoft's MCD - Level 1
Question #: 104
Topic #: 1
[All MCD - Level 1 Questions]

Refer to the exhibits.

The Set Payload transformer in the addItem child flow uses DataWeave to create an order object.
What is the correct DataWeave code for the Set Payload transformer in the createOrder flow to use the addItem child flow to add a router cal with the price of 100 to the order?

  • A. lookup( "addItem", { price: "100", item: "router", itemType: "cable" } )
  • B. addItem( { payload: { price: "100", item: "router". itemType: "cable" } } )
  • C. lookup( "addItem", { payload: { price: "100", item: "router", itemType: "cable" } } )
  • D. addItem( { price: "100", item: "router", itemType: "cable" } )
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
almoraima
Highly Voted 3 years, 8 months ago
A is correct https://docs.mulesoft.com/mule-runtime/4.3/dw-mule-functions-lookup
upvoted 19 times
...
ExamDev
Most Recent 10 months ago
Selected Answer: A
A. lookup( "addItem", { price: "100", item: "router", itemType: "cable" } ) - The first argument is for what flow to be called - The second argument is the payload
upvoted 1 times
...
martademanzana
1 year ago
Selected Answer: A
A is correct
upvoted 1 times
...
corazonvikingo
1 year, 1 month ago
Yes, A seems correct according to MuleSoft's own documentation. But since Dataweave version 2.5, the documentation also says that the lookup function is deprecated and that flow reference is recommended instead.
upvoted 2 times
Alandt
9 months, 3 weeks ago
That's true, I'm guessing we won't get any Lookup questions but instead we will get flow-ref.
upvoted 1 times
...
...
frediepulgoso
2 years, 8 months ago
A is correct
upvoted 1 times
...
mubashirhassan2030
2 years, 12 months ago
A. lookup( 'addItem', { price: '100', item: 'router', itemType: 'cable' } ) B. addItem( { payload: { price: '100', item: 'router'. itemType: 'cable' } } ) C. lookup( 'addItem', { payload: { price: '100', item: 'router', itemType: 'cable' } } ) D. addItem( { price: '100', item: 'router'. itemType: 'cable' } )
upvoted 2 times
...
RessSysop
3 years, 4 months ago
A is correct
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...