Mulesoft MCD-Level 1 MuleSoft Certified Developer – Level 1 (Mule 4) Online Training
Mulesoft MCD-Level 1 Online Training
The questions for MCD-Level 1 were last updated at Nov 19,2024.
- Exam Code: MCD-Level 1
- Exam Name: MuleSoft Certified Developer - Level 1 (Mule 4)
- Certification Provider: Mulesoft
- Latest update: Nov 19,2024
Refer to the exhibits.
What is valid text to set the field in the Database connector configuration to the username value specified in the config.yaml file?
- A . ${db.username>
- B . #[db.username]
- C . #[db:username]
- D . ${db:username>
A
Explanation:
option 3 is the correct syntz to access application properties
An API implementation has been deployed to CloudHub and now needs to be governed. IT will not allocate additional vCore for a new Mule application to act as an API proxy.
What is the next step to preseive the current vCore usage, but still allow the Mule application to be
managed by API Manager?
- A . Register the same API implementation in Runtime Manager to connect to API Manager
- B . Modify the API implementation to use auto-discovery to register with API Manager
- C . Upload the Mule application’s JAR file to the API instance in API Manager
- D . Deploy the same API implementation behind a VPC and configure the VPC to connect to API Manager
B
Explanation:
Correct answer is Modify the API implementation to use auto-discovery to register with API Manager
API Autodiscovery
Configuring autodiscovery allows a deployed Mule runtime engine (Mule) application to connect with API Manager to download and manage policies and to generate analytics data. Additionally, with autodiscovery, you can configure your Mule applications to act as their own API proxy.
When autodiscovery is correctly configured in your Mule application, you can say that your application’s API is tracked by (green dot) or paired to API Manager. You can associate an API in a Mule setup with only one autodiscovery instance at a given time.
MuleSoft Doc Ref: https://docs.mulesoft.com/api-manager/2.x/api-auto-discovery-new-concept
A flow needs to combine and return data from two different data sources. It contains a Database SELECT operation followed by an HTTP Request operation.
What is the method to capture both payloads so the payload from the second request does not overwrite that from the first?
- A . Put the Database SELECT operation inside a Cache scope
- B . Put the Database SELECT operation inside a Message Enricher scope
- C . Nothing, previous payloads are combined into the next payload
- D . Save the payload from the Database SELECT operation to a variable
D
Explanation:
Correct answer is Save the payload from the Database SELECT operation to a variable Response from HTTP request will override the payload and hence response of database SELECT can be lost. Best way to preserve is to assign payload of first operation to variable using Transform Message.
A Mule project contains a MySQL Database dependency. The project is exported from Anypoint Studio so it can be deployed to CloudHub.
What export options create the smallest deployable archive that will successfully deploy to CloudHub?
A)
B)
C)
D)
- A . Option A
- B . Option B
- C . Option C
- D . Option D
Why would a Mule application use the ${http.port} property placeholder for its HTTP Listener port when it is deployed to CloudHub?
- A . Allows CloudHub to automatically change the HTTP port to allow external clients to connect to the HTTP Listener
- B . Allows CloudHub to automatically register the application with API Manager
- C . Allows MuleSoft Support to troubleshoot the application by connecting directly to the HTTP Listener
- D . Allows clients to VPN directly to the application at the Mule application’s configured HTTP port
A
Explanation:
This helps CloudHub to dynamically allocates a port at deployment time.
MuleSoft Doc Ref: https://docs.mulesoft.com/mule-runtime/4.3/deploy-to-cloudhub#prerequisites
Reference: https://docs.mulesoft.com/runtime-manager/developing-applications-for-cloudhub
Refer to the exhibit.
The error occurs when a project is run in Anypoint Studio. The project, which has a dependency that is not in the MuleSoft Maven repository, was created and successfully run on a different computer.
What is the next step to fix the error to get the project to run successfully?
- A . Edit the dependency in the Mule project’s pom.xml file
- B . Install the dependency to the computer’s local Maven repository
- C . Deploy the dependency to MuleSoft’s Maven repository
- D . Add the dependency to the MULE_HOME/bin folder
B
Explanation:
As dependency is not present in Mulesoft Maven repository, we need to install the dependency on computer’s local Maven repository.
https://docs.mulesoft.com/mule-runtime/4.3/maven-reference
A web client submits a request to http://localhost:8081?flrstName=john.
What is the correct DataWeave expression to access the firstName parameter?
- A . #[attributes.queryParams.firstName]
- B . #[message.queryParams.hrstName]
- C . #[message.inboundProperties.’http.query.params’.firstName]
- D . #[attributes.’http.query.params’.firstName]
By default, what happens to a file after it is read using an FTP connector Read operation?
- A . The file is deleted from the folder
- B . The file is moved to a different folder
- C . The file stays in the same folder unchanged
- D . The file is renamed in the same folder
C
Explanation:
File is not updated when FTP read operations is performed.
MuleSoft Doc Ref: https://docs.mulesoft.com/file-connector/1.3/file-read
Refer to the exhibits.
The Validation component in the Try scope throws an error.
What response message is returned to a client request to the main flow’s HTTP Listener?
- A . Success – main flow
- B . Error – main flow
- C . Error – Try scope
- D . Validation Error
A
Explanation:
Note that private flow has error scope defined as On Error Continue. So when error occurs in private flow, it is handled by this On Error Continue scope which sends success response back to main flow and does not throw back an error. So main continues normally and payload is set to Success – main flow.
Hence correct answer is Success – main flow
1) HTTP listener received request
2) The Flow Reference calls the child flow
3) The Is Number validator creates an Error Object because the payload isn’t an integer. Child Flow execution stops
#[error.description] = “payload is not a valid INTEGER value” #[error.errorType] = VALIDATION:INVALID_NUMBER
4) The On Error Continue handles the errorThe payload is set to “Error C Sub Flow”
5) “Error C Sub Flow” is returned to the main flow as if the child flow was a success. The Set Payload is executed. The payload is reset to “Success C Finished Main Flow”
6) “Success C Main Flow” is returned to the requestor in the body of the HTTP request. HTTP Status Code: 200
As you can see, in the above example, because the error was caught by an On Error Continue scope in the child flow (RED in, GREEN out) when the Mule Message returns to the parent flow, the parent flow knows none-the-different that there was a failure because the on error continue returns a 200 success message. Note that because, to the mainFlow, the childFlow appeared to succeed, the processing of mainFlow resumed after the flow reference.
Refer to the exhibit.
What is a valid expression for the Choice router’s when expression to route events to the documenticShipping flow?
- A . 0#[ payload = ‘US’ ]
- B . #[ payload == ‘US’ J
- C . #[ if(payload = ‘US’) J
- D . #[ if(payload == "US") ]
B
Explanation:
Choice Router
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.
Properties of <when>
PropertyDescription
Expression (expression)
Expression in DataWeave language to evaluate input.
If the expression evaluates to true, this routing option is used:
<when expression="#[vars.language == ‘Spanish’]" >
Mulesoft Doc Ref: https://docs.mulesoft.com/mule-runtime/4.3/choice-router-concept With respect to above information,
Option 1 is the correct syntax as others are incorrect because of below reasons
* Single = is not the correct syntax to validate the condition. It should be ==
* If keyword is not required in when condition.