A Utlility.dwl is located in a Mule project at src/main/resources/modules. The Utility.dwl file defines a function named encryptString that encrypts a String What is the correct DataWeave to call the encryptString function in a Transform Message component?
A. 1. %dw 2.0
2. output application/json
3. import modules::Utility
4. ---
5. Utility::encryptString( "John Smith" )
B. 1. %dw 2.0
2. output application/json
3. import modules::Utility
4. ---
5. encryptString( "John Smith" )
C. 1. %dw 2.0
2. output application/json
3. import modules.Utility
4. ---
5. encryptString( "John Smith" )
D. 1. %dw 2.0
2. output application/json
3. import modules.Utility
4. ---
5. Utility.encryptString( "John Smith" )
Explanation:
Correct answer is
%dw 2.0
output application/json
import modules::Utility
---
Utility::encryptString( "John Smith" )
DataWeave 2.0 functions are packaged in modules. Before you begin, note that
DataWeave 2.0 is for Mule 4 apps. For Mule 3 apps, refer to DataWeave Operators in the
Mule 3.9 documentation. For other Mule versions, you can use the version selector for the
Mule Runtime table of contents.
Functions in the Core (dw::Core) module are imported automatically into your DataWeave
scripts. To use other 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:
import dw::core::Strings
import camelize, capitalize from dw::core::Strings
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. For example, this import directive does not identify any
functions to import from the String module, so it calls the pluralize function like this:
Strings::pluralize("box").
Transform
%dw 2.0
import dw::core::Strings
output application/json
---
{ 'plural': Strings::pluralize("box") }
Refer to the exhibits.

A. Option A
B. Option B
C. Option C
D. Option D
How are multiple conditions used in a Choice router to route events?
A. To route the same event to the matched route of EVERY true condition
B. To find the FIRST true condition, then distribute the event to the ONE matched route.
C. None of these
D. To find the FIRST true condition, then route the same event to the matched route and ALL FOLLOWING routes
Explanation:
Choice router finds the FIRST true condition, then distribute the event to the ONE matched
route.
MuleSoft Doc Ref : https://docs.mulesoft.com/mule-runtime/4.1/choice-router-concept
The Choice router dynamically routes messages through a flow according to a set of
DataWeave expressions that evaluate message content. Each expression is associated
with a different routing option. The effect is to add conditional processing to a flow, similar
to an if/then/else code block in most programming languages.
Only one of the routes in the Choice router executes, meaning that the first expression that
evaluates to true triggers that route’s execution and the others are not checked. If none of
the expressions are true, then the default route executes.
Refer to the exhibit.
In the execution of the Scatter-Gather, the "steep 1 sec" Flow Reference takes about 1
second to complete, and the "sleep 5 sees" Row Reference takes about 5 secondsto
complete.
About how many seconds does it take from the time the Scatter-Gather is called until the
Set Payload transformer is called?
A.
0
B.
1
C.
5
D.
6
5
Refer to the exhibit 
What is the output payload in the On Complete phase
A.
summary statistics with NO record data
B.
The records processed by the last batch step: [StepTwol, StepTwo2, StepTwo3]
C.
The records processed by all batch steps: [StepTwostepOnel, stepTwostepOne2,
StepTwoStepOne3]
D.
The original payload: [1,2,31
The original payload: [1,2,31
What is the object type returned by the File List operation?
A. Object of String file names
B. Array of String file names
C. Object of Mule event objects
D. Array of Mule event objects
Explanation: The List operation returns an array of messages in which: Each message holds the file’s content in its payload. The file’s attributes section carries the file’s metadata (such as name, creation time, and size). The payload is empty if the element is a folder.
Explanation: Correct answer is {customerID}.
A. var toUpper(userName) -> upper(userName)
B. fun toUpper(userName) = upper(userName)
C. fun toUpper(userName) -> upper(userName)
D. var toUpper(userName) = upper(userName)
A function named toUpper needs to be defined that accepts a string named userName and
returns the string in uppercase.
What is the correct DW code to define the toUpper function?
According to MuleSoft, what is the Center for Enablement’s role in the new IT operating model?
A. Implements line of business projects to enforce common security requirements
B. Creates and manages discoverable assets to be consumed by line of business developers
C. Centrally manages partners and consultants to implement line of business projects
D. Implements line of business projects to enforce common security requirements
Correct answer is Creates and manages discoverable assets to be consumed by line of
business developers.
C4E does not get directly involved in projects.
| Page 8 out of 29 Pages |
| Mulesoft MCD-Level-1 Exam Questions Home | Previous |