QuestionQ54

VerifiedDeveloping Mule Applications

Refer to the exhibits. The Set Payload transformer in the addItem child flow uses DataWeave to build 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 cable priced at 100 to the order?

Question Image

Explanation

The lookup function executes the named flow and passes its second argument as that flow’s payload. Passing the item object directly lets addItem resolve payload.item, payload.itemType, and payload.price to router, cable, and 100, respectively. A nested payload object would not match those selectors.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!