Mulesoft MCD-Level-1 Exam Questions

229 Questions


Updation Date : 2-Jun-2025



Mulesoft MCD-Level-1 exam questions feature realistic, exam-like questions that cover all key topics with detailed explanations. You’ll identify your strengths and weaknesses, allowing you to focus your study efforts effectively. By practicing with our MCD-Level-1 practice test, you’ll gain the knowledge, speed, and confidence needed to pass the Mulesoft exam on your first attempt.

Why leave your success to chance? Our Mulesoft MCD-Level-1 dumps are your ultimate guide to passing the exam on your first try!

A Mule project contains a DataWeave module like WebStore.dwl that defines a function named loginUser. The module file is located in the project's src/main/resources/libs/etl folder.
What is correct DataWeave code to import all of the WebStore.dwl file's functions and then call the loginUser function for the login "Todd.Pal@mulesoft.com"?


A. 1. 1. import libs.etl
2. 2. ---
3. 3. WebStore.loginUser("Todd.Pal@mulesoft.com")


B. 1. 1. import * from libs::etl
2. 2. ---
3. 3. WebStore::loginUser("Todd.Pal@mulesoft.com")


C. 1. 1. import libs.etl.WebStore
2. 2. ---
3. 3. loginUser("Todd.Pal@mulesoft.com")


D. 1. 1. import * from libs::etl::WebStore
2. 2. ---
3. 3. loginUser("Todd.Pal@mulesoft.com")





D.
  1. 1. import * from libs::etl::WebStore
2. 2. ---
3. 3. loginUser("Todd.Pal@mulesoft.com")

Explanation:
* 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:
Reference: https://docs.mulesoft.com/mule-runtime/4.3/dw-functions

There are three routes configured for Scatter-Gather and incoming event has a payload is an Array of three objects. How routing will take place in this scenario?


A. Incoming array objects would be split into three and each part would be sent to one route each in sequential manner


B. Incoming array objects would be split into three and each part would be sent to one route each in parallel


C. Entire event would be sent to each route sequentially


D. Entire event would be sent to each route in parallel





D.
  Entire event would be sent to each route in parallel

Explanation:
Entire event would be sent to each route in parallel.
Scatter-Gather works as follows :
- The Scatter-Gather component receives a Mule event and sends a reference of this Mule event to each processing route.
- Each of the processing routes starts executing in parallel. After all processors inside a route finish processing, the route returns a Mule event, which can be either the same Mule event without modifications or a new Mule event created by the processors in the route as a result of the modifications applied.
- After all processing routes have finished execution, the Scatter-Gather component creates a new Mule event that combines all resulting Mule events from each route, and then passes the new Mule event to the next component in the flow.

Refer to the exhibits.



A.

Option A


B.

Option B


C.

Option C


D.

Option D





C.
  

Option C



What valid RAML retrieves details on a specific customer by its customerId as a URI parameter?


A. 1. /customers:
2. /get:
3. /customerId:


B. 1. /customers:
2. /{customerId}:
3. get:


C. 1. /customers:
2. /customerId:
3. get:


D. 1. /customers:
2. get:
3. /{customerId}:





B.
  1. /customers:
2. /{customerId}:
3. get:

Correct answer is below as it follows the correct syntax.
/customers:
/{customerId}:
get:

A company has defined two RAML fragments, Book Data Type and Book Example to be used in APIs. What would be valid RAML to use these fragments?


A. 1. #%RAML 1.0
2. title: Books
3. types:
4. Book: ABC/Examples/bookDataType.raml
5. /books:
6. post:
7. body:
8. application/json:
9. type: Book
10. examples:
11. input: ABC/Examples/bookExample.raml
12. responses:
13. 201:
14. body:
15. application/json:
16. example:
17. message: Book added


B. 1.#%RAML 1.0
2.title: Books
3.Book: !include bookDataType.raml
4./books:
5. post:
6. body:
7. application/json:
8. type: Book
9. examples:
10. input: !include bookExample.raml
11. responses:
12. 201:
13. body:
14. application/json:
15. example:
16. message: Book added


C. 1.#%RAML 1.0
2.title: Books
3.Book: bookDataType.raml
4./books:
5. post:
6. body:
7. application/json:
8. type: Book
9. examples:
10. input: bookExample.raml
11. responses:
12. 201:
13. body:
14. application/json:
15. example:
16. message: Book added


D. 1.#%RAML 1.0
2.title: Books 3.Book: bookDataType.raml
4./books:
5. post:
6. body:
7. application/json:
8. type: Book
9. examples:
10. input: bookExample.raml
11. responses:
12. 201:
13. body:
14. application/json:
15. example:
16. message: Book added





D.
  1.#%RAML 1.0
2.title: Books 3.Book: bookDataType.raml
4./books:
5. post:
6. body:
7. application/json:
8. type: Book
9. examples:
10. input: bookExample.raml
11. responses:
12. 201:
13. body:
14. application/json:
15. example:
16. message: Book added

Explanation:
* RAML file contains lot of information that could be considered as "not API-describing". Sort of "economy-class" members. Equally important, but not necessarily part of the main RAML file.
* Through !includes, RAML allows us to build file-distributed API definitions, which is not only useful to encourage code reuse but also improves readability.
* We can create RAML fragments with such code and then include them in main RAML project using !include like:
types:
Book: !include bookDataType.raml and examples:
input: !include bookExample.raml
* Additionally for

Refer to the exhibit.

The default scope in choice router recursively calls the color flow.
A web client sends a PUT request to the HTTP listener with payload Blue.
What response is returned to the web client?


A. "Blk"


B. "Green"


C. A timeout error


D. ["Blue", "Red", "Blk"]





C.
  A timeout error

Explanation:
Sequence can be described as follows.
* When web client sends the request , it sends payload as Blue (mentioned in question)
* In first iteration this will go to default choice , which sets payload to Red
* Via default route , flow will call itself with payload as Red
* In second iteration , as payload is Red , it will go to first route in choice router which will set payload to Blk and second iteration will end returning back payload as Blk to first iteration.
* This Blk will be again set to payload and first iteration will end returning back response as Blk

Refer to the exhibits.

The Set Variable transformer is set with value #[ [ first "Max" last "Mule"} ].
What is a valid DataWeave expression to set as the message attribute of the Logger to access the value "Max" from the Mule event?


A. vars "customer first"


B. "customer first"


C. customer first


D. vars "customer" "first"





D.
  vars "customer" "first"

Refer to the exhibits.

What DataWeave expression transforms the conductorIds array to the XML output?


A. 1. 1. trains:
2. 2. conductorIds map ((engId, index) ->
3. 3. train: {
4. 4. engineerId: engId
5. 5. }
6. 6. )


B. 1. 1. { trains:
2. 2.
3. 3. conductorIds map ((engId, index) ->
4. 4. train: {
5. 5. engineerId: engId
6. 6. }
7. 7. )
8. 8. }


C. 1. 1. trains:
2. 2. {(
3. 3. conductorIds map ((engId, index) ->
4. 4. train: {
5. 5. engineerId: engId
6. 6. }
7. 7. )
8. 8. )}


D. 1. 1. {( trains:
2. 2.
3. 3. conductorIds map ((engId, index) ->
4. 4. train: {
5. 5. engineerId: engId
6. 6. }
7. 7. )
8. 8. )}





C.
  1. 1. trains:
2. 2. {(
3. 3. conductorIds map ((engId, index) ->
4. 4. train: {
5. 5. engineerId: engId
6. 6. }
7. 7. )
8. 8. )}

Explanation:
Points to remember:
* XML must have a root element.
* XML only allows one root element
* To avoid multiple root issues, you must create a root element for the XML output, whenever we transform output
* When mapping array elements (JSON or JAVA) to XML, wrap the map operations in {(..)}
-{ } are defining the object
( ) are transforming each element in the array as a key/value pair
* The transformation to XML would fail if the above mentioned considerations were not taken into account.
* Thus the transformation script declares a root element as trains and wraps the data in “{( )}“.
Whenever you see such type of question, always look out for root element followed by {( )} wrapping map.
I call this a "Wrap The Map" scenario. Hope it would help you remember !


Page 7 out of 29 Pages
Mulesoft MCD-Level-1 Exam Questions Home Previous