ExamGecko
Home / MuleSoft / MCD - Level 1 / List of questions
Ask Question

MuleSoft MCD - Level 1 Practice Test - Questions Answers, Page 6

List of questions

Question 51

Report Export Collapse

Refer to the exhibits.

MuleSoft MCD - Level 1 image Question 51 52606 09182024213609000000

The two Mule configuration files belong to the same Mule project. Each HTTP Listener is configured with the same host string and the port number, path, and operation values are shown in the display names.

What is the minimum number of global elements that must be defined to support all these HTTP Listeners?

1
1
2
2
3
3
4
4
Suggested answer: C
Explanation:

In this case three configurations will be required each for port 8000, 6000 and 7000.

There would be three global elements defined for HTTP connections.

Each HTTP connection will have host and port. One example shown below with host as localhost and port 6000

MuleSoft MCD - Level 1 image Question 51 explanation 52606 09182024213609000000

To use an HTTP listener, you need to declare a configuration with a corresponding connection. This declaration establishes the HTTP server that will listen to requests.

Additionally, you can configure a base path that applies to all listeners using the configuration.

<http:listener-config name='HTTP_Listener_config' basePath='api/v1'>

<http:listener-connection host='0.0.0.0' port='8081' />

</http:listener-config>

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

asked 18/09/2024
Selladurai Ravi
47 questions

Question 52

Report Export Collapse

Refer to the exhibits. What payload is logged at the end of the main flow?

MuleSoft MCD - Level 1 image Question 52 52607 09182024213609000000

[order1, order2, order3, order4]
[order1, order2, order3, order4]
[1, 2, 3, 4]
[1, 2, 3, 4]
order4
order4
order1order2order3order4
order1order2order3order4
Suggested answer: B
Explanation:

For Each Scope

The For Each scope splits a payload into elements and processes them one by one through the components that you place in the scope. It is similar to afor-each/forloop code block in most programming languages and can process any collection, including lists and arrays. The collection can be any supported content type, such asapplication/json,application/java, orapplication/xml.

General considerations about the For Each scope:

By default, For Each tries to split the payload. If the payload is a simple Java collection, the For Each scope can split it without any configuration. The payload inside the For Each scope is each of the split elements. Attributes within the original message are ignored because they are related to the entire message.

For Each does not modify the current payload. The output payload is the same as the input.

Mule Doc Reference :https://docs.mulesoft.com/mule-runtime/4.3/for-each-scope-concept

asked 18/09/2024
Victor Bogdan Grecu
36 questions

Question 53

Report Export Collapse

Refer to the exhibit.

MuleSoft MCD - Level 1 image Question 53 52608 09182024213609000000

What is the correct DataWeave expression for the Set Payload transformer to call the createCustomerObject flow with values for the first and last names of a new customer?

lookupC createCustomerObJect( 'Alice', 'Green- ) )
lookupC createCustomerObJect( 'Alice', 'Green- ) )
createCustomerObject( { first: 'Alice', last: 'Green' > )
createCustomerObject( { first: 'Alice', last: 'Green' > )
lookupf 'createCustomerObject', { first: 'Alice', last: 'Green' > )
lookupf 'createCustomerObject', { first: 'Alice', last: 'Green' > )
createCustomerObject( 'Alice', 'Green')
createCustomerObject( 'Alice', 'Green')
Suggested answer: C
Explanation:

lookup(String, Any, Number)

This function enables you to execute a flow within a Mule app and retrieve the resulting payload.

It works in Mule apps that are running on Mule Runtime version 4.1.4 and later.

Similar to the Flow Reference component (recommended), the lookup function enables you to execute another flow within your app and to retrieve the resulting payload. It takes the flow's name and an input payload as parameters. For example, lookup('anotherFlow', payload) executes a flow named anotherFlow.

Correct answer is

lookup( 'createCustomerObject', {first: 'Aice, last: 'Green'})

MuleSoft Documentation Reference : https://docs.mulesoft.com/mule-runtime/4.3/dw-mule-functions-lookup

asked 18/09/2024
Baheilu Tekelu
40 questions

Question 54

Report Export Collapse

What is the output type of the DataWeave map operator?

String
String
Array
Array
Map
Map
Object
Object
Suggested answer: B
asked 18/09/2024
Pooja Pendyala
40 questions

Question 55

Report Export Collapse

Refer to the exhibits.

MuleSoft MCD - Level 1 image Question 55 52610 09182024213609000000

What is written to the records.csv file when the flow executes?

The JSON payload
The JSON payload
An error message
An error message
Nothing
Nothing
The payload convert to CVS
The payload convert to CVS
Suggested answer: A
Explanation:

Transform Message Add write_date is coverting payload in JSON format and same JSON payload is avaialble to file write processor. However, if the payload is a different format (for example, not CSV) , you can place the transformation inside the Write operation to generate content that will be written without producing a side effect on the message in transit. This is not done in this case. By default, the connector writes whatever is in the message payload. Hence JSON payload will be written to file.

asked 18/09/2024
Vilfride Lutumba
44 questions

Question 56

Report Export Collapse

Refer to the exhibit.

MuleSoft MCD - Level 1 image Question 56 52611 09182024213609000000

How many private flows does APIKIT generate from the RAML specification?

1
1
2
2
3
3
4
4
Suggested answer: D
asked 18/09/2024
Ben Johnson
41 questions

Question 57

Report Export Collapse

Refer to the exhibits.

MuleSoft MCD - Level 1 image Question 57 52612 09182024213609000000

The Validation component in the private flow throws an error. What response message is returned to a client request to the main flow's HTTP Listener?

Error - private flow
Error - private flow
Error - main flow
Error - main flow
Success - main flow
Success - main flow
Validation Error
Validation Error
Suggested answer: B
Explanation:

Error in validation component will get processed by Processer level On Error Propagate block and then error will be rethrown which will get processed by flow level error handler which will set payload to 'Error- main flow'. Hence correct answer is Error - main flow

1) Request is received by HTTP listener

2) Try scope gets executed

3) The validator component in the Try scope creates an Error Object because the payload is not null.

4) The On Error Propagate handles the error. The payload is set to ''Error -- Try scope''

6) ''Error -- Try scope'' is returned to the 'On Error Continue' block. Main flow execution stops. Payload is set to 'Error - main flow'

7) ''Error - main flow'' is returned to the requestor in the body of the HTTP request. HTTP Status Code: 200

------------------------------------------------------------------------------------------------------------------------------------------

Reference Diagram though not exactly same, conditions are similar. They will help you answer any new question on error handling in real exam:

MuleSoft MCD - Level 1 image Question 57 explanation 52612 09182024213609000000

https://docs.mulesoft.com/mule-runtime/4.3/on-error-scope-concept#on-error-continue

asked 18/09/2024
Oktorio Rizki Prasetya
47 questions

Question 58

Report Export Collapse

Refer to the exhibit.

MuleSoft MCD - Level 1 image Question 58 52613 09182024213609000000

What should be changed to fix the 415 error?

set the response Content-Type header to text/plain
set the response Content-Type header to text/plain
set the response Content-Type header to application/json
set the response Content-Type header to application/json
Set the request Content-Type header to application/] son
Set the request Content-Type header to application/] son
set the request Content-Type header to text/plain
set the request Content-Type header to text/plain
Suggested answer: C
Explanation:

The HTTP 415 Unsupported Media Type client error response code indicates that the server refuses to accept the request because the payload format is in an unsupported format. The format problem might be due to the request's indicated Content-Type or Content-Encoding , or as a result of inspecting the data directly. In this case as per RAML specification data is expected in application/json and in request Content-Type is set as 'text/plain' which is incorrect. Hence solution is set the request Content-Type header to application/json

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415

MuleSoft MCD - Level 1 image Question 58 explanation 52613 09182024213609000000

asked 18/09/2024
Rudy Raijmakers
43 questions

Question 59

Report Export Collapse

Refer to the exhibit.

MuleSoft MCD - Level 1 image Question 59 52614 09182024213609000000

What is the output payload in the On Complete phase

summary statistics with NO record data
summary statistics with NO record data
The records processed by the last batch step: [StepTwol, StepTwo2, StepTwo3]
The records processed by the last batch step: [StepTwol, StepTwo2, StepTwo3]
The records processed by all batch steps: [StepTwostepOnel, stepTwostepOne2, StepTwoStepOne3]
The records processed by all batch steps: [StepTwostepOnel, stepTwostepOne2, StepTwoStepOne3]
The original payload: [1,2,31
The original payload: [1,2,31
Suggested answer: A
Explanation:

This is a trcik question. On complete phase pyalod consists of summary of records processed which gives insight on which records failed or passed. Hence option 4 is correct answer

MuleSoft Documentation Reference : https://docs.mulesoft.com/mule-runtime/4.3/batch-processing-concept#on-complete

asked 18/09/2024
Patricia Escobar
38 questions

Question 60

Report Export Collapse

Refer to the exhibit.

MuleSoft MCD - Level 1 image Question 60 52615 09182024213609000000

MuleSoft MCD - Level 1 image Question 60 52615 09182024213609000000

The main flow is configured with their error handlers. A web client submit a request to the HTTP Listener and the HTTP Request throws an HTTP:NOT_FOUND error.

What response message is returned?''

What response message is returned?

APP: API RESOURCE NOT FOUND
APP: API RESOURCE NOT FOUND
HTTP: NOT FOUND
HTTP: NOT FOUND
other error
other error
success - main flow
success - main flow
Suggested answer: A
Explanation:

Correct answer is APP: API RESOURCE NOT FOUND

---------------------------------------------------------------------------------------------------------------------------------------------------

1) A web client submits the request to the HTTP Listener.

2) The HTTP Request throws an 'HTTP:NOT_FOUND' error, execution halts.

3) The On Error Propagate error Handler handles the error. In this case ,HTTP:NOT_FOUND error is mapped to custom error APP:API_RESOURCE_NOT_FOUND. This error processor sets payload to APP:API_RESOURCE_NOT_FOUND.

4) ''APP:API_RESOURCE_NOT_FOUND. '' is the error message returned to the requestor in the body of the HTTP request with HTTP Status Code: 500

Reference Diagram:

MuleSoft MCD - Level 1 image Question 60 explanation 52615 09182024213609000000

asked 18/09/2024
Akram Abou Soultan
36 questions
Total 235 questions
Go to page: of 24

Related questions