MuleSoft mcd-level-1 practice test

MuleSoft Certified Developer - Level 1 (Mule 4) Exam

Last exam update: May 17 ,2024
Page 1 out of 15. Viewing questions 1-15 out of 226

Question 1

Refer to the exhibits.


The main flow contains a Flow Reference component configured to call the child flow What part(s) of
a Mule event passed to the Flow Reference component are available in the child flow?

  • A. The payload and all attributes
  • B. The payload and all variables
  • C. The entire Mule event
  • D. The payload
Answer:

B

User Votes:
A
50%
B 6 votes
50%
C 11 votes
50%
D 1 votes
50%

Discussions
vote your answer:
A
B
C
D
0 / 1000
noteimporta
1 year, 1 month ago

I think the correct answer is the C

3 months, 2 weeks ago

ChatGPT:

C. The entire Mule event

When a Mule flow calls another flow using a Flow Reference, the entire Mule event, including its payload, attributes, and variables, is passed to the referenced flow.


Question 2

Refer to the exhibits.



A Mule application is being developed to process web client POST requests with payloads containing
order information including the user name and purchased items The Shipping connector returns a
shipping address for the input payloads user name The Shipping connector's Shipping Address
operation is configured with a target named shippingAddress.
The Set Payload transformer needs to set an item key equal to the items value from the original
received payload and a shippinglnfo key equal to the the ShippingAddress operation's response
What is a straightforward way to property configure the Set Payload transformer with the required
data?
A)

B)

C)

D)

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Answer:

B

User Votes:
A 1 votes
50%
B 7 votes
50%
C 1 votes
50%
D 1 votes
50%

Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 3

Refer to the exhibits.


The my-app xml file contains an Error Handier scope named "global-error-handler"
The Error Handler scope needs to be set to be the default error handler for every flow in the Mule
application
Where and how should the value "global-error-handler" be added in the Mule project so that the
Error Handler scope is the default error handler of the Mule application?

  • A. In the mule-artifact json file, as the value of a key-value pair
  • B. In the Validation folder as the value of a global element in the error-handling yaml file
  • C. In the pom.xml file, as the value of a global element
  • D. In the my-app.xml file, as an attribute of a configuration element
Answer:

D

User Votes:
A 2 votes
50%
B 4 votes
50%
C 1 votes
50%
D 9 votes
50%

Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 4

Refer to the exhibits.

The Mule application does NOT define any global error handlers.
The Validation component in the private flow throws an error
What response message is returned to a web client request to the main flow's HTTP Listener?

  • A. ''Child error"
  • B. "Parent error"
  • C. "Validation Error"
  • D. "Parent completed"
Answer:

C

User Votes:
A
50%
B 2 votes
50%
C 8 votes
50%
D 1 votes
50%

Discussions
vote your answer:
A
B
C
D
0 / 1000
10 months, 3 weeks ago

please more explanation about the answer

3 months, 2 weeks ago

According to Mulesoft expert it's answer C: https://help.mulesoft.com/s/question/0D56R00008fIqYTSA0/error-handling-in-mule-4-course


Question 5

Refer to the exhibits The Mule application does NOT define any global error handlers.
A web client sends a POST request to the Multi application with this input payload The File Write
operation throws a FILECONNECTIVITY error
What response message is returned to the web client?


  • A. "ORDER NOT_CREATED"
  • B. "OTHER ERROR"
  • C. "File written"
  • D. "FILECONNECTIVITY"
Answer:

A

User Votes:
A 9 votes
50%
B
50%
C
50%
D 2 votes
50%

Discussions
vote your answer:
A
B
C
D
0 / 1000
10 months, 3 weeks ago

please i want the document than explain me more about the error handler in mulesoft

8 months, 3 weeks ago

Order not created


Question 6

A shopping API contains a method to look up store details by department
To get information for a particular store, web clients will submit requests with a query parameter
named department and a URI parameter named storeld.
What is a valid RAML snippet that supports requests from web clients to get data for a specific
storeld and department name?
A)

B)

C)

D)

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Answer:

C

User Votes:
A 1 votes
50%
B
50%
C 9 votes
50%
D
50%

Discussions
vote your answer:
A
B
C
D
0 / 1000
3 months, 2 weeks ago

According to ChatGPT it's option C


Question 7

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

A.
1.
1. trains:
2.
2. {(
3.
3. a map ((engId, index) ->
4.
4. train: {
5.
5. TrainNumber: engId
6.
6.
7.
7. }
8.
8. )
9.
9. )}
B.
1.
1. trains:
2.
2. a map ((engId, index) ->
3.
3. train: {
4.
4. TrainNumber: engId
5.
5.
6.
6. }
7.
7. )
C.
1.
1. {(
2.
2. trains:
3.
3. a map ((engId, index) ->
4.
4. train: {
5.
5. TrainNumber: engId
6.
6.
7.
7. }
8.
8. )
9.
)}
D.
1.
1. {
2.
2. trains:
3.
3. a map ((engId, index) ->
4.
4. train: {
5.
5. TrainNumber: engId
6.
6.
7.
7. }
8.
8. )
9.
}

Answer:

A

User Votes:

Explanation:
For such questions always look for Syntax:
I call it "Wrap the Map"
trains:
{(
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

Discussions
vote your answer:
0 / 1000
3 months, 2 weeks ago

Given answer is wrong. Check the official documentation: https://docs.mulesoft.com/dataweave/latest/dataweave-cookbook-map
The map is NOT wrapped. So the correct answer is B.


Question 8

What is the correct Syntax to add a customer ID as a URI parameter in the HTTP listener's path
attribute?

  • A. #[customerID]
  • B. $[customerID]
  • C. {customerID}
  • D. (customerID)
Answer:

C

User Votes:
A
50%
B
50%
C 9 votes
50%
D
50%

Explanation:
URL parameters are always accessed using { } like => {customerID}

Discussions
vote your answer:
A
B
C
D
0 / 1000
acwork
2 months, 3 weeks ago

The correct answer is C


Question 9

An API instance of type API endpoint with API proxy is created in API manager using an API
specification from Anypoint Exchange. The API instance is also configured with an API proxy that is
deployed and running in CloudHub.
An SLA- based policy is enabled in API manager for this API instance.
Where can an external API consumer obtain a valid client ID and client secret to successfully send
requests to the API proxy?
A.
In the organization's public API portal in Anypoint Exchange, from an approved client application for
the API proxy
B.
In Anypoint Studio, from components generated by APIkit for the API specification
C.
In Anypoint Studio, from components generated by Rest Connect for API specification
D.
In Runtime Manager, from the properties tab of the deployed approved API proxy

Answer:

A

User Votes:

Explanation:
* When a client application is registered in Anypoint Platform, a pair of credentials consisting of a
client ID and client secret is generated.
* When the client application requests access to an API, a contract is created between the
application and that API.
* An API that is protected with a Client ID Enforcement policy is accessible only to applications that
have an approved contract.
--------------------------------------------------------------------------------------------------------------------------------------
-------
Correct Answer: In the organization's public API portal in Anypoint Exchange, from
Explanation:an approved client application for the API proxy
Reference:
https://docs.mulesoft.com/api-manager/2.x/client-id-based-policies

Discussions
vote your answer:
0 / 1000
3 months, 2 weeks ago

A is correct

acwork
2 months, 3 weeks ago

Correct Answer: In the organization's public API portal in Anypoint Exchange, from
Explanation:an approved client application for the API proxy
Reference:
https://docs.mulesoft.com/api-manager/2.x/client-id-based-policies


Question 10

Refer to the exhibits. Client sends the request to ClientRequestFlow which calls ShippingFlow using
HTTP Request activity.
During E2E testing it is found that that HTTP:METHOD_NOT_ALLOWED error is thrown whenever
client sends request to this flow.
What attribute you would change in ClientRequestFlow to make this implementation work
successfully?



  • A. Change the method attribute value to "*’’
  • B. Change the path attribute value to "/api/ship"
  • C. Change the allowed method attributes value to "POST"
  • D. Change the protocol attribute value to "HTTPS"
Answer:

C

User Votes:
A 1 votes
50%
B
50%
C 7 votes
50%
D 1 votes
50%

Explanation:
Correct answer is Change the method attributes value to "POST".
It can be fixed in either of the two ways as below.
1) Changing method attribute to POST in ClientRequestFlow
2) Setting allowedMethods as PUT in ShippingFlow (but doesn't fit as question mentions about
changing ClientRequestFlow)

Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 11

An organization is beginning to follow Mulesoft's recommended API led connectivity approach to use
modern API to support the development and lifecycle of the integration solutions and to close the IT
delivery gap.
What distinguishes between how modern API's are organized in a MuleSoft recommended API-led
connectivity approach as compared to other common enterprise integration solutions?
A.
The API interfaces are specified as macroservices with one API representing all the business logic of
an existing and proven end to end solution
B.
The API interfaces are specified at a granularity intended for developers to consume specific aspect
of integration processes
C.
The API implementation are built with standards using common lifecycle and centralized
configuration management tools
D.
The APIO implementations are monitored with common tools, centralized monitoring and security
systems

Answer:

B

User Votes:

Explanation:
Correct answer is The API interfaces are specified at a granularity intended for developers to
consume specific aspect of integration processes

Discussions
vote your answer:
0 / 1000

Question 12

Refer to the exhibits.
The mule application implements a REST API that accepts GET request from two URL's which are as
follows
1)
http://acme.com/order/status
2)
http://acme.com/customer/status
What path value should be set in HTTP listener configuration so that requests can be accepted for
both these URL's using a single HTTP listener event source?

A.
*[order,customer]/status
B.
?[order,customer]/status
C.
*/status
(Correct)
D.
*status

Answer:

C

User Votes:

Explanation:
Correct answer is */status as it is the correct way to use wildcards while configuring path value in
HTTP listener

Discussions
vote your answer:
0 / 1000

Question 13

Refer to the exhibits. APIKit router is used to generate the flow components for RAML specification.
The Mule application must be available to REST clients using the two URL's
http://localhost:8081/internal
and
http://localhost:8081/external
How many APIKit Router components are generated to handle requests to every endpoint defined in
RAML specification?
1.
Library.raml
2.
/books
3.
get:
4.
post:
5.
/order:
6.
get
7.
patch
8.
/members
9.
get:

  • A. 1
  • B. 2
  • C. 3
  • D. 5
Answer:

A

User Votes:
A 4 votes
50%
B
50%
C
50%
D 4 votes
50%

Explanation:
Correct answer is 5 as APIkit for REST generates a backend flow for each resource-action pairing in a
RAML file.
MuleSOft Doc Ref :
https://docs.mulesoft.com/mule-runtime/4.2/build-application-from-api

Discussions
vote your answer:
A
B
C
D
0 / 1000
3 months, 2 weeks ago

In total, there are 5 APIKit Router components that would be generated to handle requests to every endpoint defined in the RAML specification:

GET /books
POST /books
GET /books/order
PATCH /books/order
GET /books/order/members

acwork
2 months, 3 weeks ago

I also think that the correct answer's D. one flow for each resource


Question 14

Refer to the exhibits. In the color flow , both the variable named color and payload are set to "red".
An HTTP POST request is then sent to the decideColor flow's HTTP Listener.
What is the payload value at the Logger component after the HTTP request completes?



A. white
B. red
C. blue
D. Error message

Answer:

C

Explanation:
Correct answer is white.
Key thing to note here is that variables are not available to the called flow when it is invoked using
HTTP request.
So the flow goes like below
1) Color variable is set to red
2) Payload is set to red
3) Child flow is called using HTTP request which means variables are not available in called flow (They
would have been if flow reference activity would have been used)
4) Hence set payload activity will set payload to white as color variable is null
5) Payload returned in main flow is white.
6) So finally output of logger is white

Discussions
0 / 1000
3 months, 2 weeks ago

There is no reference from the child flow to the parent flow, hence the variable being 'null'

3 months, 2 weeks ago

Thanks for submitting , your comment will be approved soon by our moderators


Question 15

What is output of Dataweave flatten function?
A.
Object
B.
Map
C.
Array
(Correct)
D.
LInkedHashMap

Answer:

C

User Votes:

Explanation:
Correct answer is Array.
Flatten turns a set of subarrays (such as [ [1,2,3], [4,5,[6]], [], [null] ]) into a single, flattened array
(such as [ 1, 2, 3, 4, 5, [6], null ]).
This example defines three arrays of numbers, creates another array containing those three arrays,
and then uses the flatten function to convert the array of arrays into a single array with all values.
Source
%dw 2.0
output application/json
var array1 = [1,2,3]
var array2 = [4,5,6]
var array3 = [7,8,9]
var arrayOfArrays = [array1, array2, array3]
---
flatten(arrayOfArrays)
Output
[ 1,2,3,4,5,6,7,8,9 ]

Discussions
vote your answer:
0 / 1000
To page 2