ExamGecko
Home Home / MuleSoft / MCD - Level 1

MuleSoft MCD - Level 1 Practice Test - Questions Answers

Question list
Search
Search

List of questions

Search

Related questions











Refer to the exhibit.

What is the correct syntax to add an employee ID as a URI parameter in an HTTP Listener path?

A.
(employeelD)
A.
(employeelD)
Answers
B.
${emp!oyeelD}
B.
${emp!oyeelD}
Answers
C.
{employeelD}
C.
{employeelD}
Answers
D.
# [employeelD]
D.
# [employeelD]
Answers
Suggested answer: C

Explanation:

Paths

The path of an HTTP listener can be static, which requires exact matches, or feature placeholders. Placeholders can be wildcards (*), which match against anything they are compared to, or parameters ({param}), which not only match against anything but also capture those values on a URI parameters map.

Take the following example paths for three listeners using a configuration that establishesapi/v1as the base path:

account/mulesoft/main-contact: only match the exact path requesthttp://awesome-company.com/api/v1/account/mulesoft/main-contact

account/{accountId}/main-contact: matches all path requests structured similarly, such ashttp://awesome-company.com/api/v1/account/salesforce/main-contact, and savesalesforceas the value ofaccountId.

account/{accountId}/*: matches all path requests different frommain-contact, such ashttp://awesome-company.com/api/v1/account/mulesoft/users, and savemulesoftas the value ofaccountId.

Mule Ref Doc :https://docs.mulesoft.com/http-connector/1.6/http-listener-ref#paths

An SLA based policy has been enabled in API Manager. What is the next step to configure the API proxy to enforce the new SLA policy?

A.
Add new property placeholders and redeploy the API proxy
A.
Add new property placeholders and redeploy the API proxy
Answers
B.
Add new environment variables and restart the API proxy
B.
Add new environment variables and restart the API proxy
Answers
C.
Restart the API proxy to clear the API policy cache
C.
Restart the API proxy to clear the API policy cache
Answers
D.
Add required headers to the RAML specification and redeploy the new API proxy
D.
Add required headers to the RAML specification and redeploy the new API proxy
Answers
Suggested answer: D

Explanation:

Correct answer is Add required headers to RAML specification and redeploy new API proxy

MuleSoft Doc Ref : https://docs.mulesoft.com/api-manager/2.x/tutorial-manage-an-api

Steps are as below :

Add the Required RAML Snippet

SLA-based rate limiting requires adding a RAML or OAS snippet to your API. This procedure demonstrates adding a RAML snippet.

Specify the client ID and secret as query parameters.

Add a section called traits: at the RAML root level to define query parameters:

traits:

- client-id-required:

queryParameters:

client_id:

type: string

client_secret:

type: string

Add the client-id-required trait to every method that requires these query parameters:

/users:

get:

is: [client-id-required]

description: Gets a list of JSONPlaceholder users.

Step 2 : Add the SLA Tier in API Manager

Step 3 : Apply the policy and redeploy

What payload is returned by a Database SELECT operation that does not match any rows in the database?

A.
false
A.
false
Answers
B.
null
B.
null
Answers
C.
Exception
C.
Exception
Answers
D.
Empty Array
D.
Empty Array
Answers
Suggested answer: D

Explanation:

Empty array is returned when no rows are matched.

MuleSoft Doc Ref : https://docs.mulesoft.com/db-connector/1.9/database-connector-select

What is the correct syntax to define and call a function in Database?

A)

B)

C)

D)

A.
Option A
A.
Option A
Answers
B.
Option B
B.
Option B
Answers
C.
Option C
C.
Option C
Answers
D.
Option D
D.
Option D
Answers
Suggested answer: A

Explanation:

Keyword to ad function in Dataweave transformation is fun. Hence option 2 and 4 are invalid. Also parameters needs to be passed exactly in same order as defined in function definition. Hence correct answer is'

fun addKV( object: Object, key: String, value: Any) =

object ++ {(key):(value)}

---

addKV ( {'hello': 'world'}, 'hola', 'mundo' )

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

DataWeave Function Definition Syntax

To define a function in DataWeave use the following syntax:

fun myFunction(param1, param2, ...) = <code to execute>

The fun keyword starts the definition of a function.

myFunction is the name you define for the function.

Function names must be valid identifiers.

(param1, param2, ... , paramn) represents the parameters that your function accepts.

You can specify from zero to any number of parameters, separated by commas (,) and enclosed in parentheses.

The = sign marks the beginning of the code block to execute when the function is called.

<code to execute> represents the actual code that you define for your function.

Refer to the exhibits.

A Mule application contains a Choice router. What is logged when the flow completes?

A.
EU
A.
EU
Answers
B.
US
B.
US
Answers
C.
'REGION'
C.
'REGION'
Answers
D.
['US', 'EU']
D.
['US', 'EU']
Answers
Suggested answer: B

Refer to the exhibit.

The Mule application Is debugged in Any point Studio and stops at the breakpoint What is the value of the payload displayed In the debugger at this breakpoint?

A.
0
A.
0
Answers
B.
'Processing'
B.
'Processing'
Answers
C.
'Start'
C.
'Start'
Answers
D.
Complete'
D.
Complete'
Answers
Suggested answer: C

Refer to the exhibit.

What DataWeave expression transforms the conductorlds array to the XML output?

A)

B)

C)

D)

A.
Option A
A.
Option A
Answers
B.
Option B
B.
Option B
Answers
C.
Option C
C.
Option C
Answers
D.
Option D
D.
Option D
Answers
Suggested answer: C

A function named newProdCode needs to be defined that accepts two input parameters, an integer value for itemID and a string value for productCategory, and returns a new product code.

What is the correct DataWeave code to define the newProdCode function?

A.
fun newProdCode{itemID: Number, productCategory: String) ---> 'PC-' ++ productCategory ++ (itemID as String)
A.
fun newProdCode{itemID: Number, productCategory: String) ---> 'PC-' ++ productCategory ++ (itemID as String)
Answers
B.
fun newProdCode(itemID: Number, productCategory: String) = 'PC-' ++ productCategory ++ (itemID as String)
B.
fun newProdCode(itemID: Number, productCategory: String) = 'PC-' ++ productCategory ++ (itemID as String)
Answers
C.
function newProdCode(itemID: Number, productCategory: String) = 'PC-' ++ productCategory ++ (itemID as String)
C.
function newProdCode(itemID: Number, productCategory: String) = 'PC-' ++ productCategory ++ (itemID as String)
Answers
D.
var newProdCode(itemID: Number, productCategory: String) -> 'PC-' ++ productCategory ++ (itemID as String)
D.
var newProdCode(itemID: Number, productCategory: String) -> 'PC-' ++ productCategory ++ (itemID as String)
Answers
Suggested answer: B

Refer to the exhibits.

The Set Payload transformer In the addltem subflow uses DataWeave to create an order object.

What is the correct DataWeave code for the Set Payload transformer in the createOrder flow to use the addltem subflow to add a router cable with the price of 100 to the order?

A.
addltemf { payload: { price: '100', item: 'router', itemType: 'cable' } > )
A.
addltemf { payload: { price: '100', item: 'router', itemType: 'cable' } > )
Answers
B.
lookupf 'addltem', { payload: { price: '100', item: 'router', itemType: 'cable' } } )
B.
lookupf 'addltem', { payload: { price: '100', item: 'router', itemType: 'cable' } } )
Answers
C.
addltemf { price: '100', item: 'router', itemType: 'cable' })
C.
addltemf { price: '100', item: 'router', itemType: 'cable' })
Answers
D.
lookupf 'addltem', { price: '100', item: 'router', itemType: 'cable' } )
D.
lookupf 'addltem', { price: '100', item: 'router', itemType: 'cable' } )
Answers
Suggested answer: B

A Mule project contains a DataWeave module called MyModule.dwl that defines a function named formatString. The module is located in the project's src/main/resources/modules folder.

What is the correct way in DataWeave code to import MyModule using a wildcard and then call the module's formatString function?

A)

B)

C)

D)

A.
Option A
A.
Option A
Answers
B.
Option B
B.
Option B
Answers
C.
Option C
C.
Option C
Answers
D.
Option D
D.
Option D
Answers
Suggested answer: D
Total 235 questions
Go to page: of 24