What is the correct DataWeave expression for the Set Payload transformer to call the createCustomerObject flow with values for the first and last names of a new customer?

Refer to the exhibit.

What is the correct DataWeave expression for the Set Payload transformer to call the createCustomerObject flow with values for the first and last names of a new customer?
A . lookupC createCustomerObJect( "Alice", "Green- ) )
B . createCustomerObject( { first: "Alice", last: "Green" > )
C . lookupf "createCustomerObject", { first: "Alice", last: "Green" > )
D . createCustomerObject( "Alice", "Green")

Answer: C

Explanation:

lookup(String, Any, Number)

This function enables you to execute a flow within a Mule app and retrieve the resulting payload.

It works in Mule apps that are running on Mule Runtime version 4.1.4 and later.

Similar to the Flow Reference component (recommended), the lookup function enables you to execute another flow within your app and to retrieve the resulting payload. It takes the flow’s name and an input payload as parameters. For example, lookup("anotherFlow", payload) executes a flow named anotherFlow. Correct answer is

lookup( "createCustomerObject", {first: "Aice, last: "Green"})

MuleSoft Documentation

Reference: https://docs.mulesoft.com/mule-runtime/4.3/dw-mule-functions-lookup

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments