QuestionQ59

VerifiedTransform and format data with DataWeave

A Mule project includes a DataWeave module file, WebStore.dwl, which defines a function called loginUser. The module file resides in the project's src/main/resources/libs/dw folder.

Which DataWeave code correctly imports every function in WebStore.dwl and calls loginUser for the login "[email protected]"?

Explanation

A custom module at src/main/resources/libs/dw/WebStore.dwl is imported by the module path libs::dw::WebStore. Using import * from libs::dw::WebStore imports all its functions into scope, allowing loginUser(...) to be called directly without a WebStore:: qualifier. MuleSoft documents import * from as the syntax for importing all elements from a custom DataWeave module.

Learn more

Community Discussion

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