MuleSoft MCD - Level 1 Practice Test - Questions Answers, Page 7
List of questions
Related questions
Question 61
What is the correct syntax for a Logger component to output a message with the contents of a 3SON Object payload?
Explanation:
Option 3 is the only corect answer as it concatenates payload with String.
Below option wont work.
#['The payload is ' ++ payload]
Concatenation function expects both arguments to be string. As the question says payload is json object , this will throw error while running it. You can try this in Anypoint Studio and you will get the same result which I mentioned.
hence correct answer is
The payload is: #[payload]
Question 62
What path setting is required for an HTTP Listener endpoint to route all requests to an APIkit router?
Explanation:
Option1 is correct syntax to configure HTTP Listener endpoint
Question 63
Refer to the exhibits.
A web client submits a request to the HTTP Listener and the HTTP Request throws an error.
What payload and status code are returned to the web client?
Refer to the exhibits. A web client submits a request to the HTTP Listener and the HTTP Request throws an error.
What payload and status code are returned to the web client?
Explanation:
Answer:: Response body: 'Error' Default response status code: 200.-------------------------------------------------------------------------------------------------------------------------------------------------1) Payload is successfully set to ''Success -- Started Flow''2) When HTTP Request throws an error, execution halts#[error.description] = ''ABC'#[error.errorType] = 'XYZ'3) The On Error Continue scope handles the error. When On Error Continue scope is invoked, all the processors in error block are executed and success response is sent back to the client with payload which is set in error flow. In this case payload is set to 'Error' value in error block.4) ''Error'' is returned to the requestor in the body of the HTTP request with HTTP Status Code: 200 as On error continue always sends success error code.Reference Diagram:
Question 64
An app team is developing a mobile banking app. It took them two months to create their own APIs to access transaction information from a central database. The app team later found out that another team had already built an API that accesses the transaction information they need.
According to MuleSoft, what organization structure could have saved the app team two months of development time?
Explanation:
Center for Enablement is correct answer .It is a cross-functional team typically staffed with members from central IT, line-of-business departments, and digital innovation teams charged with productizing, publishing, and harvesting reusable assets and best practices. In this case , app team would have checked first with Center for Enablement before developing their own API's. Hence could have avoided re-work
Question 65
Refer to the exhibit.
What payload is returned from a request to http//localhost.8081/
Refer to the exhibits, what payload is returned from a request to http://localhost;8081/?
Explanation:
The flow can be described as below. 1) First HTTP POST requets is made in which paylaod is set to 1 and it gets returned to our mail flow. 2) Second call is initiated for JMS Publish Consume JMS: num1 which add 1 to the payload which makes it as 2. Note that pubih consume is a synchronous operation. Hence paylaod is returned to main flow. 3) Third call is initiated for JMS Publish JMS: num2 which add 1 to the payload . Note that pubih is asynchronous operation. Hence paylaod is never returned to main flow. So payload in main flow is still 2. 4) Finally Set Payload increments payload by 1 making payload as 3 which is returned by the flow. Hence option 3 is the correct answer.
Question 66
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?
Explanation:
option 3 is the correct syntz to access application properties
Question 67
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?
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
Question 68
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?
Explanation:
Correct answer isSave 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 TransformMessage.
Question 69
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?
What export option create their smallest deployable archive that will successfully deploy to CloudHub?
A)
B)
C)
D)
Question 70
Why would a Mule application use the ${http.port} property placeholder for its HTTP Listener port when it is deployed to CloudHub?
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
Question