Mule Docs 1
Mule Docs 1
2: A company with MuleSoft Titanium support develops a Salesforce System API using
MuleSoft out of the box Salesforce Connector and deploys the API to CloudHub.
Ans: Put the HTTP Request inside a try scope in Until Successful.
In the error handler, use On Error continue to catch permanent errors like
HTTP::UNAUTHORIZED
In the case of a system failure, what will happen to in-flight message in the VM Queues
that have not been consumed
Ans: For the persistent queues, the message will be processed after the system comes alive.
5: A developer has created the first version of an API designed for business partners to
work with commodity prices.
What should the developer do to allow more than one major version of the same APl to
be exposed by the implementation?
Ans: In design center open the RAML and modify baseUri to include a variable that indicates the
version number.
6: Two APIs are deployed to a two-node on-prem cluster. Due to a requirements change, the
two APIs must communicate to exchange data asynchronously.
Ans: If the two API use the same domain, the VM Connector can be leveraged
Ans: The encryption key and sensitive data should be different for each environment.
Ans: Store the content of the file on separate storage, and store the key and location of the file
using Object Store V2.
10: A developer is working an a project that requires encrypting all data before sending it
to a backend application. To accomplish this, the developer will use PGP encryption in
the Mule 4 Cryptograply module.
Ans: The application needs the public key from the backend service to encrypt the data
11: A new Mule project has been created in Anypoint Studio with the default settings
Which file inside the Mule project must be modified before using Maven to successfully
deploy the application?
Ans: pom.xml
12: Which configuration are required to HTTP Listener to enable mTLS authentication ?
Ans: Set an appropriate keystore and truststore configuration for the listener
13: 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
B.
Enable the CorrelationID checkbox in the HTTP Listener configuration
C.
Configure a custom correlation policy
D.
NO action is needed as the correlation ID is returned to the caller in the response header by default
Ans: No action is needed as the correlation ID is returned to the caller in the response header
by default.
15: Which statement is true about using mutual TLS to secure an application?
Ans. C
17: A healthcare customer wants to use hospital system data, which includes code that was
developed using legacy tools and methods. The customer has created reusable Java libraries in
order to read the data from the system.
What is the most effective way to develop an API to retrieve the data from the hospital system?
A.
Refer to JAR files in the code
B.
Include the libraries writes deploying the code into the runtime
C.
Create the Java code in your project and invoice the data from the code
D.
Install libraries in a local repository and refer to it in the pm.xml file
Ans:
Install the libraries in a local repository and refer to it in the pom.xml file
18: 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?
Use flow variables within every logger processor to log the order ID
Set a flow variable and edit the log4/2.xml file to output the variable as part of the message
pattern
Create a custom XML SDK component to wrap the logger processor and automatically add the
order ID within the connector
Use the Tracing module to set logging variables with a Mapped Diagnostic Context
Ans: Use the Tracing module to set logging variables with a Mapped Diagnostic Context
19: A Mule application exposes an API for creating payments. An Operations team wants to
ensure that the Payments APls is up and running at all times in production.
What approach should be used to test that the payments API is working in production?
Ans: Create a health check endpoint that reuses the same port number and HTTP Listener
configuration as the api itself
20: In a Mule project, Flow-1 contains a flow-ref to Flow-2. Flow-2 depends on data from
Flow-1 to execute successfully.
Which action ensures the test suites and test case written for Flow-1 and Flow-2 will
execute successfully?
Ans: use Set event to pass the input data that is needed, and keep the test cases for flow 1 and
flow 2 independent.
21: An API has been built to enable scheduling emails for a heallhcare provider. The front-and
system does very lille data entry, validation, erd preblems tar started to appear in the emails that
go out to patients. A "validate-customer Now is added to validate the data.
What is the expected behavior of the "validate-customer" Now?
A.
If only the email address Is invalid a VALIDATION.INVALID_EMAIL error is raised
B.
If the email address is invalid, processing continues to see if the appointment data and customer name are also
invalid
C.
If the appointment date and customer name are invalid, a SCHEDULE:INVALID_APPOINTMENT_DATE
error is raised
D.
If all of the values are invalid the last validation error is raised:SCHEDULE:INVALID_CUSTOMER_NAME
Ans:
If only the email address is invalid, a VALIDATION:INVALID EMAIL error is raised
22: A scatter-gather router is configured with four routes: Route A, B,C and D.
Route C fails.
Which expression allows access to the failing route so that it can be compensated?
A.
Error,errorMesage.payload.results [‘2’]
B.
Payload failures[‘2’]
C.
Error,errorMessage,payload.failures[‘2’]
D.
Payload [‘2’]
Ans: Error,errorMessage,payload.failures[‘2’]
23: A Flight Management System publishes gate change notification events whenever a flight's
arrival gate changes. Other systems including Baggage Handler System, Inflight Catering
System and Passenger Notifications System, must each asynchronously receive the same gate
change notification to process the event accordingly.
Which configuration is required in Anypoint MQ to achieve this publish/subscribe model?
24: Mule application A is deployed to CloudHub and is using Object Store v2. Mule
application B is also deployed to CloudHub.
Which approach can Mule application B use to remove values from Mule application A's
Object Store?
A.
A1, B1, F1, B2, A2
B.
B1, A1, F1, A2, B2
C.
F1, A1, B1, B2, A2
D.
F1, B1, A1, A2, B2
Answer:
A
Explanation:
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. References:
https://docs.mulesoft.com/api-manager/2.x/policies-policy-order
Ans: a1 b1 f1 b2 a2
26: Which plugin or dependency is required to unit test modules created with XML SDK?
A. XMLUnit
B. Junit
C. MUnit Extensions Maven plugin
D. MUnit Maven plugin
27: A company deploys 10 public APIs to CloudHub. Each API has its own Individual health
endpoint defined The platform operation team wants to configure API Functional Monitoring to
monitor the health of the APIs periodically while minimizing operational overhead and cost.
How should API Functional Monitoring be configured?
From one public location with each API in its own schedule
From one private location with all 10 APIs in a single schedule
From one public location with all 10 APIs in a single schedule correct
From 10 public locations with each API in its own schedule
Ans: From one public location with all 10 APIs in a single schedule
Ans: <dependency>
<groupId>XXXXX-XXXXXXX-XXXX-XXXXX-XX0-X</groupids
<artifactId>mule-plugin-bio-info</artifactIds
<version>1.0.0</version>
«classifier>mule-plugin‹/classifier> </dependency?
29: A custom policy needs to be developed to intercept all outbound HTTP requests
made by Mule applications.
Which XML element must be used to intercept outbound HTTP requests?
A.
It is not possible to intercept outgoing HTTP requests, only inbound requests
B.
http-policy:source
C.
htt-policy:operation
D.
http-policy:processor
Ans: http policy operation
30: Which pattern should be used to invoke multiple HTTP APIs in parallel and roll back
any failed requests in sequence?
Ans: Scatter-Gather as central Saga orchestrator for all API requests with compensating actions
for failing routes
Ans: The HTTP Listener generates correlation IDs unless a correlation ID is received in the
HTTP request
32: An APIhas been developed and deployed to Clouattub. Among the polices applied to
this API an allowlist of IP, A developer wants to run a test in Anypoint Studio and does
not want any policies applied because their workstation is not rolded? in the allowlist.
What must the developer do in order to run this test locally without the policies applied?
Create a properties file specifically for local development and set the API instance ID to a value that is
not used in API Manager
Pass in the runtime parameter ‘’-Danpow.platform.gatekeeper=disabled’’ correct
Deactivate the API in API Manager so the Autodiscovery element will not find the application when it
runs in Studio
Run the test as-s, with no changes because the Studio runtime will not attempt to connect to API
Manager
33: Which configurations are required for HTTP Listener to enable mTLS authenticaton?
Ans: Set an appropriate keystore and truststore configuration for the listener
34: A Mule application needs to invoke an API hosted by an external system to initiate a
process The external API takes anywhere between one minute and 24 hours to complete its
process.
Which implementation should be used to get response data from the external API after it
completes processing?
Use an HTTP Connector to invoke the API and wait for a response
Use a Scheduler to check for a response every minute
Use an HTTP Connector inside Async scope to invoice the API and wait for a response
Expose an HTTP callback API in Mule and register it with the external system
Ans: Expose an HTTP callback API in Mule and register it with the external system
35: Multiple individual Mule applications need to use the Mule Maven plugin to deploy to
CloudHub. The plugin configuration should be reused where necessary and anything
project-specific should be property-based
Where should the Mule Maven plugin detals be configured?
A parent pom.xmlcorrect
Settings, xml
Pom, xml
A Bill of Materials (BOM) parent pm
36: Which properties are mandatory on the HTTP Connector configuration in order to use the
OAuthorization Code grant type for authentication?
Ans: External callback URL, access token URL, local authorization URL, authorization URL,
client id, client secret
38: A developer deploys an API to CloudHub and applies an OAuth API policy on API
Manager. During testing the API response is slow, so the developer reconfigures the API
so that the out-of-the-box HTTP Caching policy is applied first, and the OAuth API policy
is applied second.
What will happen when an HTTP request is received?
Ans: In case of a cache hit, only the HTTP Caching policy is evaluated, then the cached
response is returned to the caller
<secureProperties>
<tls key Store password> ${tls.keyStore.password} </tts.keyStorepassword>
<secureProperties>
Ans: ${secure::tls.keystore.keyPassword}
42: A Mule application includes a subflow containing a Scatter-Gather scope. Within each leg of
Scatter-Gather, an HTTP connector calls a PUT endpoint to modify records in different
upstream systems. The subflow is called from inside an Until Successful scope to retry it a
transitory exception is raised.
A technical spike is being performed to increase reliability of the Mule application.
Which steps should be performed within the Mule flow above to ensure idempotent behavior?
Ans: Ensure an error-handling flow performs corrective actions to roll back all changes if any leg
of the Scatter-Gather fails
44: An order processing system is composed of multiple Mule applications responsible for
warehouse, sales, and shipping, Each application communicates using Anypoint MQ. Each
message must be correlated against the original order ID for observability and tracing.
How should a developer propagate the order ID as the correlation ID across each message?
Ans: Wrap all Anypoint MQ Publish operations within a With CorrelationID scope from the
Tracing module, setting the correlation ID to the order ID
45: When a client and server are exchanging messages during the mTLS handshake, what is
being;
exchange?
46: A company has been using CI/CD. Its developers use Maven to handle build and
deployment activities.
What is the correct sequence of activities that takes place during the Maven build and
deployment?
47: Which type of cache invalidation does the Cache scope support without having to write any
additional code?
Ans: Time to live
49: A Mule API receives a JSON payload and updates the target system with the payload. The
developer uses JSON schemas to ensure the data is valid.
How can the data be validated before posting to the target system?
Ans: Add the JSON module dependency and add the validate-schema operation in the flow,
configured to reference the schema
50: A Mule application uses API autodiscovery to access and enforce policies for a RESTful
implementation.
What needs to be configured for the flowRef attribute of the autodiscovery global element?
Ans: The name of the flow that has HTTP Listener to receive all incoming RESTful operation
requests
51: A healthcare portal needs to validate the token that it sends to a Mule API. The developer
plans to implemen a custom polay ding the HTTP Policy Transform Extension to match the
token received in the header from the healthcare portal.
Which files does the developer need to create in order to package the custom policy?
52: An API has been built to enable scheduling emails for a heallhcare provider. The front-and
system does very lille data entry, validation, erd problems tar started to appear in the emails that
go out to patients. A "validate-customer Now is added to validate the data.
What is the expected behavior of the "validate-customer" Now?
Ans: If only the email address is invalid, a VALIDATION:INVALID EMAIL error is raist