MCD - Level 1 Exam QuestionsBrowse all questions from this exam

MCD - Level 1 Exam - Question 10


How can you call a flow from Dataweave?

Show Answer
Correct Answer: C

To call a flow from Dataweave, you can use the Lookup function. The Lookup function dynamically evaluates and executes a flow by its name and optionally allows passing parameters. It is specifically designed for calling other flows within Dataweave scripts.

Discussion

2 comments
Sign in to comment
jpbatisOption: C
May 24, 2021

The lookup function is of very specific use, the mule's documentation indicates using the flow reference with the target. "MuleSoft recommends that you invoke flows with the Flow Ref (flow-ref) component, using the target attribute to put the result of the flow in a var and then referencing that var from within the DataWeave script." Reference: https://docs.mulesoft.com/mule-runtime/4.3/dw-mule-functions-lookup

corazonvikingo
Oct 20, 2023

Yes, good observation. The Lookup functions now seems to be deprecated, according to MuleSoft's documentation, and what you quoted is the recommended way to do it instead. There are probably no more questions about the Lookup function on the exam anymore.

sirious09Option: C
Aug 16, 2022

{a: lookup("myFlow", {b:"Hello"})}