Exam MCD - Level 1 All QuestionsBrowse all questions from this exam
Question 10

How can you call a flow from Dataweave?

    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
jpbatisOption: C

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

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

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