Mule プロジェクトには、loginUser という名前の関数を定義する WebStore.dwl のような DataWeave モジュールが含まれています。モジュール ファイルは、プロジェクトの src/main/resources/libs/etl フォルダーにあります。
WebStore.dwl ファイルのすべての関数をインポートし、ログイン「
[email protected]」の loginUser 関数を呼び出す正しい DataWeave コードは何ですか?
正解:D
* To use custom modules, you need to import the module or functions you want to use by adding the import directive to the head of your DataWeave script, for example:
1) Does not identify any functions to import from the String module:
import dw::core::Strings
2) To identify a specific function to import from the String module:
import camelize, capitalize from dw::core::Strings
3) To import all functions from the String module:
import * from dw::core::Strings
The way you import a module impacts the way you need to call its functions from a DataWeave script. If the directive does not list specific functions to import or use * from to import all functions from a function module, you need to specify the module when you call the function from your script.
* In given scenario, it's mentioned to import all of the WebStore.dwl
So correct answer is: