ExamGecko
Home Home / MuleSoft / MCD - Level 2

MuleSoft MCD - Level 2 Practice Test - Questions Answers, Page 2

Question list
Search
Search

List of questions

Search

Related questions











An API has been built to enable scheduling email provider. The front-end system does very little data entry validation, and problems have started to appear in the email that go to patients. A validate-customer'' flow is added validate the data.

What is he expected behavior of the 'validate-customer'' flow?

A.
If only the email address Is invalid a VALIDATION.INVALID_EMAIL error is raised
A.
If only the email address Is invalid a VALIDATION.INVALID_EMAIL error is raised
Answers
B.
If the email address is invalid, processing continues to see if the appointment data and customer name are also invalid
B.
If the email address is invalid, processing continues to see if the appointment data and customer name are also invalid
Answers
C.
If the appointment date and customer name are invalid, a SCHEDULE:INVALID_APPOINTMENT_DATE error is raised
C.
If the appointment date and customer name are invalid, a SCHEDULE:INVALID_APPOINTMENT_DATE error is raised
Answers
D.
If all of the values are invalid the last validation error is raised:SCHEDULE:INVALID_CUSTOMER_NAME
D.
If all of the values are invalid the last validation error is raised:SCHEDULE:INVALID_CUSTOMER_NAME
Answers
Suggested answer: A

Explanation:

The validate-customer flow uses an until-successful scope to validate each field of the customer data. The until-successful scope executes its processors until they succeed or exhausts the maximum number of retries. If any processor fails, it raises an error and stops executing the remaining processors. Therefore, if only the email address is invalid, a VALIDATION.INVALID_EMAIL error is raised and the validation of appointment date and customer name is skipped.

Reference: https://docs.mulesoft.com/mule-runtime/4.3/until-successful-scope

Multiple individual Mute application need to use the Mule Maven plugin to deploy to CloudHub.

The plugin configuration should .. reused where necessary and anything project, specific should be property-based.

Where should the Mule Maven details be configured?

A.
A parent pom.xml
A.
A parent pom.xml
Answers
B.
Settings, xml
B.
Settings, xml
Answers
C.
Pom, xml
C.
Pom, xml
Answers
D.
A Bill of Materials (BOM) parent pm
D.
A Bill of Materials (BOM) parent pm
Answers
Suggested answer: A

Explanation:

To reuse Mule Maven plugin configuration across multiple individual Mule applications, the developer should use a parent pom.xml file. A parent pom.xml file defines common configuration for one or more child projects that inherit from it. The developer can specify common properties and dependencies for all child projects in the parent pom.xml file, such as Mule Maven plugin configuration, and then reference them in each child project's pom.xml file using placeholders.

Reference: https://docs.mulesoft.com/mule-runtime/4.3/mmp-concept#parent-pom https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance

Refer to the exhibit.

What required changes can be made to give a partial successful response in case the United Airlines API returns with a timeout?

A.
Add a Scatter-gather component inside a Try scope. Set the payload to a default value 'Error' inside the error handler using the On Error Propagate scope.
A.
Add a Scatter-gather component inside a Try scope. Set the payload to a default value 'Error' inside the error handler using the On Error Propagate scope.
Answers
B.
Add Flow Reference components inside a Try scope. Set the payload to a default value'' insider the error handler using the ON Error Continue scope
B.
Add Flow Reference components inside a Try scope. Set the payload to a default value'' insider the error handler using the ON Error Continue scope
Answers
C.
Add Flow Reference components inside a Try scope Set the payload to a default value '' inside the error handler using the On Error Propagate scope
C.
Add Flow Reference components inside a Try scope Set the payload to a default value '' inside the error handler using the On Error Propagate scope
Answers
D.
Add a Scatter-Gather component inside a Try scope. Set the payload to a default value 'Error'' inside the error handler using the On Error Continue scope.
D.
Add a Scatter-Gather component inside a Try scope. Set the payload to a default value 'Error'' inside the error handler using the On Error Continue scope.
Answers
Suggested answer: D

Explanation:

To give a partial successful response in case the United Airlines API returns with a timeout, the developer should add a Scatter-Gather component inside a Try scope, and set the payload to a default value 'Error' inside the error handler using the On Error Continue scope. A Scatter-Gather component allows sending multiple requests concurrently and aggregating the responses into an array. A Try scope allows handling errors that occur within it using an error handler. An On Error Continue scope allows continuing the flow execution after handling an error. Therefore, by using these components, the developer can send requests to both APIs in parallel, handle any timeout errors from United Airlines API, and return a partial response with a default value for that API.

Reference: https://docs.mulesoft.com/mule-runtime/4.3/scatter-gather-concept https://docs.mulesoft.com/mule-runtime/4.3/try-scope-concept https://docs.mulesoft.com/mule-runtime/4.3/on-error-continue-concept

A Mule application contain two policies Policy A and Policy A has order1, and Policy B has order 2. Policy A Policy B, and a flow are defined by he configuration below.

When a HTTP request arrives at the Mule application's endpoint, what will be the execution order?

A.
A1, B1, F1, B2, A2
A.
A1, B1, F1, B2, A2
Answers
B.
B1, A1, F1, A2, B2
B.
B1, A1, F1, A2, B2
Answers
C.
F1, A1, B1, B2, A2
C.
F1, A1, B1, B2, A2
Answers
D.
F1, B1, A1, A2, B2
D.
F1, B1, A1, A2, B2
Answers
Suggested answer: A

Explanation:

Based on the configuration below, when a HTTP request arrives at the Mule application's endpoint, the execution order will be A1, B1, F1, B2, A2. This is because policies are executed before and after the API implementation flow according to their order attribute. Policy A has order 1, which means it is executed first before Policy B, which has order 2. The flow is executed after both policies are executed before the flow. Then, Policy B is executed after the flow before Policy A is executed after the flow.

Reference: https://docs.mulesoft.com/api-manager/2.x/policies-policy-order

A Mule application for processing orders must log the order ID for every log message output.

What is a best practice to enrich every log message with the order ID?

A.
Use flow variables within every logger processor to log the order ID
A.
Use flow variables within every logger processor to log the order ID
Answers
B.
Set a flow variable and edit the log4/2.xml file to output the variable as part of the message pattern
B.
Set a flow variable and edit the log4/2.xml file to output the variable as part of the message pattern
Answers
C.
Create a custom XML SDK component to wrap the logger processor and automatically add the order ID within the connector
C.
Create a custom XML SDK component to wrap the logger processor and automatically add the order ID within the connector
Answers
D.
Use the Tracing module to set logging variables with a Mapped Diagnostic Context
D.
Use the Tracing module to set logging variables with a Mapped Diagnostic Context
Answers
Suggested answer: D

Explanation:

To enrich every log message with the order ID, the developer should use the Tracing module to set logging variables with a Mapped Diagnostic Context (MDC). The Tracing module allows adding custom key-value pairs to log messages using MDC variables. The developer can use Set Logging Variables operation to set the order ID as an MDC variable and then use it in any logger processor within the same thread or event.

Reference: https://docs.mulesoft.com/tracing-module/1.0/tracing-module-reference#set-logging-variables

Refer to the exhibit.

What is the result if ''Insecure'' selected as part of the HTTP Listener configuration?

A.
The HTTP Listener will trust any certificate presented by the HTTP client
A.
The HTTP Listener will trust any certificate presented by the HTTP client
Answers
B.
The HTTP Lister will accept any unauthenticated request
B.
The HTTP Lister will accept any unauthenticated request
Answers
C.
The HTTP listener will only accept HTTP requests
C.
The HTTP listener will only accept HTTP requests
Answers
D.
Mutual TLS authentication will be enabled between this HTTP Listener and an HTTP client
D.
Mutual TLS authentication will be enabled between this HTTP Listener and an HTTP client
Answers
Suggested answer: C

Explanation:

Based on the exhibit below, if 'Insecure' is selected as part of the HTTP Listener configuration, the HTTP listener will only accept HTTP requests. This means that no TLS context will be configured for this listener and no encryption or authentication will be applied to incoming requests. The protocol attribute of this listener will be set to HTTP instead of HTTPS.

Reference: https://docs.mulesoft.com/http-connector/1.6/http-listener-ref#insecure

An API has been developed and deployed to CloudHub Among the policies applied to this API is an allowlist of IP addresses. A developer wants to run a test in Anypoint Studio and does not want any policies applied because their workstation is not included in the allowlist.

What must the developer do in order to run this test locally without the policies applied?

A.
Create a properties file specifically for local development and set the API instance ID to a value that is not used in API Manager
A.
Create a properties file specifically for local development and set the API instance ID to a value that is not used in API Manager
Answers
B.
Pass in the runtime parameter ''-Danpow.platform.gatekeeper=disabled''
B.
Pass in the runtime parameter ''-Danpow.platform.gatekeeper=disabled''
Answers
C.
Deactivate the API in API Manager so the Autodiscovery element will not find the application when it runs in Studio
C.
Deactivate the API in API Manager so the Autodiscovery element will not find the application when it runs in Studio
Answers
D.
Run the test as-s, with no changes because the Studio runtime will not attempt to connect to API Manager
D.
Run the test as-s, with no changes because the Studio runtime will not attempt to connect to API Manager
Answers
Suggested answer: A

Explanation:

To run a test locally without the policies applied, the developer should create a properties file specifically for local development and set the API instance ID to a value that is not used in API Manager. This way, the developer can use different configuration properties for different environments and avoid triggering API autodiscovery when running tests locally. API autodiscovery is a mechanism that associates an API implementation with its corresponding API specification and policies in API Manager based on its API instance ID. By setting this ID to a value that does not exist in API Manager, the developer can prevent API autodiscovery from finding and applying any policies to the local test.

Reference: https://docs.mulesoft.com/api-manager/2.x/api-auto-discovery-new-concept#configuring-api-autodiscovery https://docs.mulesoft.com/mule-runtime/4.3/configuring-properties

A developer has created the first version of an API designed for business partners to work commodity prices.

What should developer do to allow more than one major version of the same API to be exposed by the implementation?

A.
In Design Center, open the RAML and modify each operation to include the major version number
A.
In Design Center, open the RAML and modify each operation to include the major version number
Answers
B.
In Anypoint Studio, generate scaffolding from the RAML, and the modify the <http:listerner> in the generated flows to include a parameter to replace the version number
B.
In Anypoint Studio, generate scaffolding from the RAML, and the modify the <http:listerner> in the generated flows to include a parameter to replace the version number
Answers
C.
In Design Center, open the RAML and modify baseUn to include a variable that indicates the version number
C.
In Design Center, open the RAML and modify baseUn to include a variable that indicates the version number
Answers
D.
In Anypoint Studio, generate scaffolding from the RAML, and then modify the flow names generated by APIKit to include a variable with the major version number
D.
In Anypoint Studio, generate scaffolding from the RAML, and then modify the flow names generated by APIKit to include a variable with the major version number
Answers
Suggested answer: C

Explanation:

To allow more than one major version of the same API to be exposed by the implementation, the developer should modify the baseUri property in the RAML file to include a variable that indicates the version number. The baseUri property defines the base URL of the API and can include variables that are replaced with actual values when mocking or deploying the API. By using a variable for the version number, the developer can expose different versions of the API using different base URLs and avoid conflicts or confusion.

Reference: https://docs.mulesoft.com/api-designer/design-modify-raml-specs#baseuri https://docs.mulesoft.com/api-manager/2.x/api-versioning


Refer to the exhibit.

When creating a new project, which API implementation allows for selecting the correct API version and scaffolding the flows from the API specification?

A.
Import a published API
A.
Import a published API
Answers
B.
Generate a local RAML from anypoint Studio
B.
Generate a local RAML from anypoint Studio
Answers
C.
Download RAML from Design Center'
C.
Download RAML from Design Center'
Answers
D.
Import RAML from local file
D.
Import RAML from local file
Answers
Suggested answer: A

Explanation:

To create a new project that selects the correct API version and scaffolds the flows from the API specification, the developer should import a published API. This option allows importing an API specification that has been published to Anypoint Exchange or Design Center, and selecting a specific version of that API specification. The developer can also choose to scaffold flows based on that API specification.

Reference: https://docs.mulesoft.com/apikit/4.x/apikit-4-new-project-task

When implementing a synchronous API where the event source is an HTTP Listener, a developer needs to return the same correlation ID back to the caller in the HTTP response header.

How can this be achieved?

A.
Enable the auto-generate CorrelationID option when scaffolding the flow
A.
Enable the auto-generate CorrelationID option when scaffolding the flow
Answers
B.
Enable the CorrelationID checkbox in the HTTP Listener configuration
B.
Enable the CorrelationID checkbox in the HTTP Listener configuration
Answers
C.
Configure a custom correlation policy
C.
Configure a custom correlation policy
Answers
D.
NO action is needed as the correlation ID is returned to the caller in the response header by default
D.
NO action is needed as the correlation ID is returned to the caller in the response header by default
Answers
Suggested answer: D

Explanation:

When implementing a synchronous API where the event source is an HTTP Listener, Mule automatically propagates some message attributes between flows via outbound and inbound properties. One of these attributes is correlation ID, which is returned to the caller in the response header by default as MULE_CORRELATION_ID.

Reference: https://docs.mulesoft.com/mule-runtime/4.3/about-mule-message#message-attributes

Total 60 questions
Go to page: of 6