Skip to main content

MuleSoft MCD-Level-1 Exam

 

MuleSoft MCD-Level-1 Exam



1) What is the output type of the DataWeave map operator?

  • A. Object
  • B. Array
  • C. Map
  • D. String
Hide Answer
Suggested Answer: C 🗳️

A Mule application contains a global error handler configured to catch any errors.
Where must the global error handler be specified so that the global error handler catches all errors from flows without their own error handlers?

  • A. A global element
  • B. The pom.xml file
  • C. Nowhere, the global error handler is automatically used
  • D. A configuration properties file
Hide Answer
Suggested Answer: D 🗳️

3) Refer to the exhibits. 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?


A . Error – private flow
B . Error – main flow
C . Success – main flow
D . Validation Error

Answer: C

 Q1: What MuleSoft API-led connectivity layer is intended to expose part of a backend database without business logic?


- experience
- data
- system
- process
- security

Answer: system

Q2)What HTTP method in a RESTful web service is typically used to replace a resource completely?

- PATCH
- PUT
- POST
- GET

Answer: - PUT

3)What statement is part of MuleSoft's description network?

- Create reusable APIs and assets designed to be consumed by other business units

- Create and manage high availability and fault tolerent services and infrastructure

- Central IT delivers complete point-to-point solutions with master data management

- Create and manage a collection of JMS messaging services and infrastructure

Answer: -Create reusable APIs and assets designed to be consumed by other business units.

4) According to MuleSoft, what is the Center for Enablement's role in the new IT operating model?

- Creates and manages discoverable assets to be consumed by line of business developers

- Centrally manages partners and consultants to implement line of business projects

- Implements line of business projects to enforce common security requirements

- Produces & manages API policies for line of business deployments

Answer: -Creates and manages discoverable assets to be consumed by line of business developers.

5) What is the format of documents exchanged in a SOAP request/response interaction?

- RAML
- JSON
- WSDL
- YAML

Answer: WSDL

6) What is the main purpose of flow designer in Design Center?

- Design API RAML files in a graphical way

- Develop fully functional Mule applications in a hosted development environment

- Define API lifecycle management in a graphical way

- Design and mock Mule application templates that must be implemented using Anypoint Studio



Answer:- Develop fully functional Mule applications in a hosted development environment

7)What is the maximum number of Mule applications that can run in a Cloud Hub Worker?

- 1
- 2
- 4
- 8

Answer:-  1


8) What MuleSoft product enables publishing, sharing, and searching of APIs?

- API Designer
- API MUnit
- API Exchange
- API Notebook

Answer:- API Exchange


9)What asset can NOT be created using Anypoint Platform Design Center?

- API Specifications
- Mule Applications
- API Fragments
- API Portals

Answer:- API Portals

10) A client submits a GET request to a Mule 4.0 application to the endpoint /customers?id=48493. Where can the id be accessed in the Mule 4.0 application?

- inbound properties
- variables
- attributes
- payload

Answer:attributes

11) In a RAML specification, what attribute defines a query parameter to be optional for a resource?

- required: false
- optional: true
- provided: false
- mandatory: false

Answer:- required: false


q12) Refer to the exhibit.
What is the correct URL to perform a GET request to /patients?


#%RAML 1.0
title: ACME Medical API
baseUri: http://dev.acme.com/api

/patients:
get:
queryParameters:
year:
type: integer

- http://dev.acme.com/patients?year=2016
- http://dev.acme.com/api/patients
- http://dev.acme.com/patients
- http://dev.acme.com/api/patients?year=2016

Answer: - http://dev.acme.com/api/patients?year=2016


q13) A RAML example fragment named BankAccountsExample.raml is placed in the examples folder in an API specification project.

What is the correct syntax for to reference the fragment?

- example: !include BankAccountsExample.raml
- example: #import BankAccountsExample.raml
- example: !include examples/BankAccountsExample.raml
- example: #import examples/BankAccountsExample.raml

Answer:- !include examples/BankAccountsExample.raml



14) Refer to the exhibit.
There is an error underneath the flight_id resources in the GET method. What needs to be done to fix the problem?

1 #%RAML 1.0
2 title: American Flights API
3 version: 1.0
4
5 /flights:
6 get:
7
8 /{flight_id}:
9
10 get:
11

- remove blank line on row 9
- enclose flight_id with parenthesis () instead of curly braces {}
- indent "get" method under {flight_id} resource one level down (to the right)
- outdent /flight_id


Answer:- Indent "get" method under {flight_id} resource one level down (to the right)


15) Refer to the exhibits.
What is the syntax to define this datatype in RAML?


<?xml version="1.0" encoding="UTF-8"?>
<music>
<collection>Classic Rock</collection>
<artists>
<artist>Deep Purple</artist>
<artist>Rainbow</artist>
</artists>
</music>

A.
music:
collection: Classic Rock
artists:
- Deep Purple
- Rainbow

B.
music:
collection: Classic Rock
artists:
Deep Purple
Rainbow

C.
music:
collection: Classic Rock
artists: Deep Purple, Rainbow

D.
music:
collection: Classic Rock
artists:
artist: Deep Purple
artist: Rainbow

Answer:-  D


What is the purpose of the router element in APIkit?

- Routes requests to API implementations, but does not validate them against RAML API specifications

- Routes responses to the caller, but does not validate them against RAML API specifications

- Validates requests against RAML API specifications and routes them to API implementations

- Validates responses returned from API requests and routes them to the caller

Answer: Validates requests against RAML API specifications and routes them to API implementations

What is NOT part of a Mule 3 message?

- payload
- inbound properties
- outbound properties
- variables
- attachments

Answer:variables


What is the minimum required configuration in a flow for a Mule application to compile?

- A message processor in the Process section of a flow
- A message processor in the Source section of a flow
- An empty flow
- A message processor in both the Source and Process sections of a flow


Answer:- A message processor in the Process section of a flow


An inbound Database connector is configured to select rows from a MySQL database.
What is the format of results returned from the database query?


- Java
- JSON
- XML
- CSV

Answer:- Java

What out-of-the-box policy can safeguard against Denial of Service type attacks?

- Rate limiting
- Throttling
- Cross-origin resource sharing
- LDAP security manager

Answer: Rate limiting

A Mule application properties file named training-DEV.properties has been defined. How is the properties file referenced in the Mule application?

- In an attribute in the main mule element
- In a Property Placeholder element
- As a -M-D placeholder when starting the Mule runtime
- In an attribute in the HTTP Listener element

Answer:- In a Property Placeholder element

What reserved property can be used in a Mule application to allow an HTTPS Listener to be accessed by external web clients after the Mule application is deployed to CloudHub?

- ${ssl.port}
- ${ssl.listener.port}
- ${https.listener.port}
- ${https.port}

Answer: ${https.port}

What port number is used to expose the domain URL of a Mule application deployed to CloudHub?

- 8081
- 81
- 80
- 8080

Ans: 80

What is NOT a role of an API proxy application running in a Mule runtime?

- Determine which request message is allowed to pass through to the API backend service

- Apply runtime policies to enforce governance

- Measure the traffic flowing through to the API backend service

- Determine which response message is allowed to pass back from the API backend service

Ans: Determine which response message is allowed to pass back from the API backend service

What happens to the outbound properties of a Mule message after completing an outbound HTTP Request?

- new outbound properties are added from the HTTP response headers

- previous outbound properties are passed through unchanged

- outbound properties are replaced with all the previous inbound properties

- all previous outbound properties are removed

Ans: All previous outbound properties are removed

What message processor can set the HTTP response status code to 200?

- Variable
- Set Payload
- Property
- Record Variable
- Attachment

Ans: Property

A web service implements an API to handle requests to http://acme.com/customers/{state}.

A web client makes a request to this API implementation at http://acme.com/customers/CA.

What is the correct MEL expression to retrieve the value CA?


- #[message.payload.inboundProperties.'http.query.params'.state]
- #[message.inboundProperties.'http.uri.params'.state]
- #[message.payload.inboundProperties.state]
- #[message.inboundProperties.state]

Ans:
 #[message.inboundProperties.'http.uri.params'.state]

What property of a Mule message is immutable?

- Attachments
- Outbound properties
- Session variables
- Payload
- Inbound properties
- Flow variables

Ans: Inbound properties

A Mule application has two flows named parentFlow and childFow. A flow variable is defined in parentFlow. What is the scope of the flow variable when the parentFlow calls childFlow using a flow reference?

- The flow variable is accessible in childFlow but is immutable

- The flow variable is accessible in childFlow, can be changed, and changes are seen back in parentFlow

- The flow variable is NOT accessible in childFlow

- The flow variable is accessible in childFlow, can be changed, but changes are NOT seen back in parentFlow

Ans:The flow variable is accessible in childFlow, can be changed, and changes are seen back in parentFlow.

Q30) What is true for a Mule subflow?

- It can have its own exception strategy
- It is executed synchronously
- An external client can send messages directly to it
- It must be in the same configuration file as the parent flow

Ans: It is executed synchronously

What is the default processing strategy of a one-way flow?

- Queued-asynchronous
- Synchronous
- Non-blocking
- Thread-per-processor
- Queued-thread-per-processor

Ans:  Queued-asynchronous

What is required for two Mule applications to share data using a VM connector component?

- Put the Mule applications in the same Anypoint Platform environment

- Put the Mule applications in the same Anypoint Platform business group

- Put the Mule applications in the same non-default Mule domain

- Put the Mule applications in the same default Mule domain

Ans: Put the Mule applications in the same non-default Mule domain

How are outbound properties automatically passed to an outbound REST request using an HTTP Request component?

- As headers
- As query parameters
- As URI parameters
- In the message payload
- As attachments
- As flow variables

Ans: As headers

A WSDL defines a conversionRate operation with an input message that requires two parts: fromCurrency and toCurrency.

How are fromCurrency and toCurrency set in the flow in order to call the conversionRate operation using a Web Service Consumer component?


- In two flow variables
- As outbound properties
- As inbound properties
- In the message payload
- As attachments

In the message payload

What file type is required to configure a Web Service Consumer to consume a SOAP web service?

- RAML
- WSDL
- JSON
- OAS

Ans: WSDL

What is NOT a way to pass data to a RESTful web service in a flow using an outbound HTTP Request component?

- Set URI parameters in the HTTP Request component
- Set inbound properties before the HTTP Request component
- Set query parameters in the HTTP Request component
- Set outbound properties before the HTTP Request component

Set inbound properties before the HTTP Request component

An exception is caught by a choice exception strategy. How is the exception routed?

- To all exceptions whose conditions evaluate to true
- To the first exception strategy whose condition evaluates to true
- To the first exception strategy whose condition evaluates to true and to the default exception strategy
- To the first exception strategy whose condition evaluates to true and to the global exception strategy

To the first exception strategy whose condition evaluates to true

How is a default exception strategy set in a Mule application?

- In a configuration global element in any Mule configuration XML file
- In the mule-app.properties file
- As an attribute of one or more flow configuration elements in one or more Mule configuration XML files
- As an attribute of a global exception strategy
- As a JVM system environment variable

In a configuration global element in any Mule configuration XML file

How are conditions used in a Choice flow control?

- To find the first true condition, then routes the message to that and all subsequent target message processors.

- To select a set of target message processors to which to route the same message

- To find the first true condition, then routes the message to the matched Choice target message processor

- To select from the responses after routing the message to every Choice target message processor

To find the first true condition, then routes the message to the matched Choice target message processor

A Scatter-Gather flow control sends the inbound message to three separate HTTP requests. Each request returns a JSON object. What is the final output of the Scatter-Gather flow control?

- An array of JSON objects
- An array of array objects
- An object that contains JSON objects
- The last JSON object

An array of JSON objects

How is a data collection routed in a Scatter-Gather flow control?

- The entire message is sent to each route and processed sequentially

- The message is split and different pieces are routed and processed in parallel

- The message is split and different pieces are routed and processed sequentially

- The entire message is sent to each route and processed in parallel

The entire message is sent to each route and processed in parallel

A Payload filter is configured to test for type java.lang.String. What happens when the filter is passed a message with the payload null?

- The Mule application stops
- The message is replayed from the start of the flow
- The message is passed to subsequent message processors
- All subsequent message processors are skipped

All subsequent message processors are skipped


What message processor will throw an exception if a message payload is not a number?

- Is Number validator
- Is Not Number validator
- Is Number filter
- Is Not Number filter

Is Number validator

A Mule flow has a JMS queue listener as the message source. Where can the next message processor access a JMS message's header?

- Outbound property
- Inbound property
- Payload
- Attachment
- Flow variable

Inbound property

What part of a Mule flow can contain a Poll scope?

- Async scope
- Message source
- For Each scope
- Message Enricher scope

Message source

How is a Poll scope's watermark accessed from a message processor in a flow?

- In a session variable
- In an outbound property
- In an inbound property
- In a flow variable
- In a header

In a flow variable

A File connector is configured to read files from a /mule/input directory. All other File connector settings are the default settings. What happens to a file after it is processed by the File connector?

- The file is moved to /mule/output
- The file is deleted from the input directory, but is not moved anywhere
- The file is moved to /tmp
- The file stays in the input directory

The file is deleted from the input directory, but is not moved anywhere


What phase of a batch job using a Batch scope must contain at least one message processor?

- Input
- Load and Dispatch
- Process Records
- On Complete

Process Records

A message payload is modified using a Message Enricher scope with an empty target. What is true about the message payload that leaves the Message Enricher scope?

- The payload is changed to the modified payload
- The modified payload is stored in a flow variable
- The modified payload is stored as an inbound property
- The payload returns to the original payload
- The modified payload is stored as an outbound property

The payload returns to the original payload

A Batch scope has three batch steps. A message processor in the second batch step throws an exception because the input data is incomplete. What is the default behavior after the exception is thrown?

- Continues to the third batch step
- Stops processing the entire batch job
- Retries the second batch step
- Retries the first batch step

Stops processing the entire batch job


What is the scope of a record variable in a Batch scope?

- In a single batch step, but not in the other batch steps
- In all batch steps, but not in the On Complete phase
- In the message source, each batch step, and the On Complete phase
- In all batch steps, and the On Complete phase

In all batch steps, but not in the On Complete phase





https://quizlet.com/519223198/mulesoft-practice-exam-flash-cards/



1.      What HTTP method in a RESTful web service is typically used to completely replace an existing resource?

·         PUT

2. According to mulesoft, what is the center for enablement’s role in the new IT operating model?

·         creates & manages discoverable assets to be consumed by the line of business developers.

3. What statement is part of Mulesoft’s description of an application network?

·         Creates reusable APIs & assets designed to be consumed by other business units.

4. What mulesoft API led connectivity layer is intended to expose part of a backend database without a business logic?

·         System

5. Refer to the exhibit. the API specification supports searching for articles on the searchworld.org site
What is the most idiomatic(used for the intended purpose) URL method to retrieve articles about “einstein” in XML format?

https://miro.medium.com/max/622/1*e41-neIycAIb8Avin74iJA.png

·         Ans
http://www.searchworld.org/s/api.php?action=search&query=einstein&format=xml
AUTH : SK33DKD83829283JS

https://miro.medium.com/max/1400/1*WIMkWIcUTtgvPyZL81WpXA.png

6. What is the core characteristic of modern API?

·         API is designed first using an API specification for rapid feedback

7. What assets can NOT be created using the Design Center?

·         API portals

8. What assets CAN be created using the Design Center?

·         API specification

·         Mule Applications

·         Api Fragments

9. What Mulesoft product enables sharing & searching of APIs?

·         API Exchange

10. Where does a deployed Flow Designer application run in anypoint platform?

·         CloudHub Worker

11. What is the main purpose of Flow Designer in the Design Center?

·         To design and develop fully functional Mule applications in a hosted development environment.

12. A web client submits a GET request to a Mule 4 application to the endpoint/customers?id=548, where is the id stored in the Mule event by HTTP Listener?

·         Attributes

Following is a representation of the Mule event

https://miro.medium.com/max/806/1*WyA9HZOz13mZDmTCAXPFAA.png

13. Refer to the exhibit. There is an error in the flight_id resource’s GET method. What needs to be done to fix the problem?

#%RAML 1.0
version: v1
title: American Flight API/flights:
  get:
    /{flight_id}:
get:

·         Intend the get method under the {flight_id} resource.

14. A RAML example fragment named BankAccountsExample.raml is placed in the examples folder in an API specification project. What is the correct syntax to reference the fragment?

examples: !include examples/BankAccountExample.raml

15. An API has been created in the Design Center. What is the next step to make the API discoverable?

·         Publish the API to anypoint platform

16. Refer the exhibit. What is the correct URL to submit a GET request to /patients?

#%RAML 1.0
title: ACME Medical API
baseUri: 
http://dev.acme.com/api/patients:
  get:
    queryParameters:
      year:
        type: integer
        example: 2017

·         http://dev.acme.com/api/patients?year=2016

17. Refer to the exhibit. This RAML specification includes an XML example that matches the Record data type defined in another RAML file named recordsDataType.raml Using the Records type, how how can this XML be represented in RAML?

#%RAML 1.0
title: Records API/records:
  get:
    responces:
      200:
        body:
          application/xml:
            example:
            <music>
              <colleection>Deep Collection</collection>
              <artists>
                <artist1>Deep purple</artist1>
                <artist2>Rainbow</artist2>
              </artists>
            </music>

·         Ans:

#%RAML 1.0
title: Records API/records:
  get:
    responces:
      200:
        body:
          application/xml:
            type: Records
              example:
                music:
                  collection: "Deep Collection"
                  artists:
                    artist1: "Deep purple"
                    artist2: "Rainbow"

18. How does APIkit determine the number of flows to generate from a RAML specification?

·         Creates a separate flow for each HTTP method

19. What is NOT part of Mule 4 event?

·         inbound properties

20. What are part of Mule 4 event?

·         message

·         payload

·         attributes

21. what is the purpose of the API:router element in APIkit?

·         Validates requests against RAML API specifications & routes them to API implementation

22. What is the minimum required configuration in flow for a mule application to compile?

·         An event processor

23. A database connector is configured to select rows from a MySQL database. What is the format of the array of results returned from the database query?

·         Java

24. API manager has been configured to enforce an SLA policy and the RAML spec has been updated with the required client_id and client_secret header requirements.
The new RAML spec has been published to anypoint exchange.
What is the next step to gain the access of the API?

·         Request access to the API in Anypoint Exchange

25. What does the Mule runtime use to enforce policies and limit acess to APIs?

·         The Mule runtime’s embeded API gateway

26. What does an API proxy application NOT do?

·         Determine which response Mule event is allowed to pass through to the API backend service

27. What does an API proxy application do?

·         Determine which request Mule event is allowed to pass through the API backend service

·         Apply runtime policies to enforce governance

·         Meter the traffic flowing through the proxy

28. How many Mule applications can run on cloudhub worker?

·         At most one

29. What is the purpose of API autodiscovery ?

·         Allows a deployed Mule application to connect with API manager to download policies and act as its own API proxy

30. A mule application has a flow named parentFlow.
The parentFlow contains an HTTP request operation at the end of the flow. The parentFlow also contains a Set Variable operation right before the HTTP Request operation.
What is the scope of the variable to the server receiving the HTTP request from parentFlow?

·         The variable is NOT accessible in the server.

31. A mule application has two flows named parentFlow and childFlow. The childFlow begins with an HTTP Listener. A variable is defined in parentFlow, then an HTTP request is made to childFlow’s HTTP Listener with some heeaders set. What is the scope of the variable and attributes in the parentFlow after childFlow returns a response?

·         The variable is accessible. All the attributes passed to childFlow are removed or replaced.

32. What is NOT part of Mule 4 event?

·         outboundProperties

33. Refer to the exhibit. What is the correct DataWeave expression for accessing the city Cleveland from JSON payload?

[
  {
    "orderID":592,
    "shipping":"international",
    "city":"Tokyo,
    "price":5922345
  },
  {
    "orderID":678,
    "shipping":"domestic",
    "city":"Cleveland,
    "price":5123456
  },
  {
    "orderID":253,
    "shipping":"international",
    "city":"Berlin,
    "price":57654543
  },

·         #[payload[1].city]

34. A flow contains an HTTP listener as the event source. What is the DataWeave expression to log the content-type header using a logger component?

·         #[“Content-Type: “ ++ attributes.headers.’content-type’]

35. A web service implements an API to handle requests to http://acme.com/customers/{state}.

A web client makes a request to this API implementation at http://acme.com/customers/CA

What is the correct DataWeave expression to retrieve the value CA?

·         #[attributes.uriParams.state]

36. A Set Variable component saves the current payload to a variable with the name images. What is the DataWeave expression to access the images variable?

·         #[vars.images]

37. What happens to the attributes of a Mule event in a flow after the outbound HTTP request is made?

·         Attributes are replaced with the new attributes form HTTP request-response(which might be null)

38. What can ONLY be done with VM connectors, and not with Flow References in a single Mule application?

·         Allow flow to pass events to another flow asynchronously

39. In what file does a Mule project keep track of all of its dependencies?

·         pom.xml

40. Why must a Mule application’s deployable archive package all its dependencies in order to be deployed to CloudHub?

·         CloudHub workers cannot download ALL possible project dependencies a project may contain

41. What reserved property can be defined and used in Mule application to allow an HTTP Listener to be accessed by external web clients after a Mule application is deployed to CloudHub?

·         ${https.port}

42. Refer to exhibit. In the deployable archive’s/classes folder, there are two properties files named dev.properties and prod.properties deploy to CloudHub through Runtime Manager with the following error message

https://miro.medium.com/max/1400/1*7U5fssM1Cn8hqZLb7woosw.png

·         The env property is NOT set in Runtime Manager in the Mule application’s properties tab

43. A Mule application has two flows named parentFlow and childFlow. A variable is defined in parentFlow. What is the scope of the variable when the parentFlow calls childFlow using Flow Reference?

·         The variable can be accessed in childFlow, can be changed, and changes are seen back in parentFlow

44. What file type is required to configure a Web Service Consumer to consume a SOAP web service?

·         WSDL

45. How are query parameters dynamically passed to an outbound REST requesting using an HTTP Request operation?

·         As query parameters in the HTTP Request operation

46. Refer to the exhibit. The flow calls a SOAP endpoint using the Consume operation of the Web Service Consumer. The service has a required input parameter.

What event processor can be used to build the SOAP envelope with the required argument to pass to the SOAP service?

https://miro.medium.com/max/926/1*EoQxV3AdhF9IE2TPCbavpg.png

·         Transform Message

47. An HTTP Request operation returns a JSON array of objects. In the Transform Message component, what is the process to convert the array of the objects to an array of custom JAVA Account objects?

·         Add the account object metadata to the output and use the drag-and-drop feature to transform the incoming JSON data.

48. What is the process to create a connector using REST connect?

·         Design the API in Design Center and publish the API to exchange.

49. How are multiple conditions used in a Choice router to route events?

·         To find the FIRST true condition, then distribute the event to the ONE matched route

50. A Scatter-Gather processes three separate HTTP requests. Each request returns a Mule event with a JSON payload.

What is the final output of the Scatter-Gather?

·         An object containing

51. An event contains a payload that is an array of objects how is the event routed in a Scatter-Gather?

·         The ENTIRE event is sent to each route and processed in PARALLEL.

52. What module and operation will throw an error if a Mule event’s payload is not a number?

·         Validation module’s Is Number operation

53. Refer to the exhibit. What happens to this flow when the Validation module’s Is not null operation throws an error?

https://miro.medium.com/max/742/1*APIquS0MVsazltUZod2oFg.png

https://miro.medium.com/max/1400/1*t-nMtGwB1RREGnBpgWN-iw.png

·         The flow stops processing its Mule event and returns an error message to the HTTP Listener operation

54. Refer to the exhibit. The main flow has an On Error Continue scope with the type set to HTTP:NOT_FOUND. The Mule application configures globalErrorHandler as its default error handler.

A web client posts a request to the HTTP Listener. The transform message component then throws a MULE:EXPRESSION error trying to convert the payload to application/xml.

What response message is returned to the web client?

https://miro.medium.com/max/1116/1*Hwb96JKWD9Zwx9DxF1VYOQ.png

https://miro.medium.com/max/762/1*IZqeAbk2niVsOUamG1cGTg.png

https://miro.medium.com/max/1400/1*tVfiNKrEgdxoT8KIwmQwwg.png

·         The MULE:EXPRESSION error’s message

55. How can an error scope be configured to catch all errors in the HTTP namespace?

·         Type:
When: #[error.errorType.namespace == “HTTP”]

56. Refer to the exhibit. The main flow has an On Error Continue scope and the private flow has an On Error Propagate scope.

A web client makes an HTTP GET request to the HTTP Listener. The Is number validator in the private flow then throws an error with message “validate — payload is an integer”

What response message is returned to the web client?

https://miro.medium.com/max/1268/1*UV4iA7imjewEkJmbOMwp4w.png

https://miro.medium.com/max/1400/1*e0_St0xwYxTEo8SGlscJBQ.png

·         Error — main flow

57. Refer to the exhibit. The private flow has On Error Propagate scope. The Mule application configures globalErrorHandler as its default error handler.

A web client makes an HTTP GET request to the HTTP Listener. The Is number validator in the private flow then throws an error with message “validate — payload is an integer”

What response message is returned to the web client?

https://miro.medium.com/max/1400/1*5BqPt_9Fl6oCgcpBlkaHiA.png

https://miro.medium.com/max/1400/1*wu_LWefgy_xs37ETh0gLHg.png

·         globalErrorHandler

58. Refer to the exhibit. The main flow has an On Error Propagate scope. The Mule application configures globalErrorHandler as its default error handler.

A web client makes an HTTP GET request to the HTTP Listener. The Is number validator in the private flow then throws an error with message “validate — payload is an integer”

What response message is returned to the web client?

https://miro.medium.com/max/1342/1*Ifiww0ZIu_s5Uewd-hT8og.png

https://miro.medium.com/max/1400/1*c6gjpSNnDBP5QQD6fuQhFA.png

·         validate — payload is an integer

59. Refer to the exhibit. The main flow has an On Error Continue scope. The Mule application configures globalErrorHandler as its default error handler.

A web client makes an HTTP GET request to the HTTP Listener. The Is number validator in the private flow then throws an error with message “validate — payload is an integer”

What response message is returned to the web client?

https://miro.medium.com/max/1400/1*hErZTjn8ZabFnDa6RmNb2Q.png

https://miro.medium.com/max/1400/1*KTyETVippF75Pzvu8EcILg.png

·         Error — main flow

60. What is the correct way to format the decimal 20.3844 as a String to two decimal places?

·         20.3844 as String {format: “.0#”}

61. What DataWeave 2.0 type can be used as input to map operation?

·         Array

62. A Mule application has a main flow and a combineNames flow. In the main flow, a variable named fullName is set to the object {firstName: “Max”, lastName: “Mule”}.

What is valid DataWeave code to call the combineNames flow with the input object stored in the fullName variable?

·         #[lookup(“combineNames”, vars.fullName)]

63. Refer to the exhibit. What is valid DataWeave code to transform the input JSON payload to the output XML payload?

https://miro.medium.com/max/1400/1*NNVbes1BjCCNtLuCfk5t_Q.png

·         ans:

%dw 2.0
output application/xml
---
employees:
  employee
    @(
       firstname: payload[0].employee1.firstname,
       lastname: payload[0].employee1.lastname
     ): null

64. Refer to the exhibit. An event payload contains an unordered array of flight objects, where every object has a price key and a toAirport key.

What is a valid DataWeave code to return flights with a price under 500, grouped by toAirport in ascending order, with the lowest price first?

https://miro.medium.com/max/1400/1*VGO7Jt33iSAZJ_0G4OgPwQ.png

·         ans:

payload filter $.price<500
        orderBy $.price
        groupBy $.toAirport

65. A flow reference component sends a non-empty JSON object payload to another flow named childFlow, which then returns an XML body.

A flow reference component saves the payload returned from childFlow to its target attributes named payload. Refer to the exhibit.

What is true about the Mule event’s payload at the next event processor after the Flow Reference component?

https://miro.medium.com/max/1328/1*N8oAcfxW7WyqdithCZRkSg.png

·         The payload is original JSON object.

66. Refer to the exhibit. What is the object type returned by the File List operation?

https://miro.medium.com/max/890/1*-kU6Lm9aQr1uG7zoolHNQQ.png

·         Array of Mule event objects

67. In the database On Table Row operation, what does the Watermark column enables the On Table Row operation to do?

·         To avoid duplicate processing of records in the database

68. Assume that a database table contains a recordID column that always increases as new records get added to the table.

In Mule application, what is the key process to enable manual watermarking for requests to a database using the Scheduler endpoint and the Database SELECT operation?

·         Save the max recordID from the set of the recordIDs in an Object Store and reference this recordID in subsequent database request.

69. A flow has a JMS Publish Consume operation followed by a JMS Publish operation. Both of these operations have the default configurations.

Which operation is asynchronous and which one is synchronous?

·         Publish Consume: Synchronous

·         Publish: Asynchronous

70. Refer to the exhibit. What is the output of the Logger component in the Batch job?

https://miro.medium.com/max/1400/1*F94CudVqrGuHoTWVa6flUg.png

https://miro.medium.com/max/1400/1*eJpXiOFWjC8SNl6rNkwJAA.png

·         Ans: [0.333, 1]

71. A batch job scope has three batch steps. An event processor in the second batch step throws an error because the input data is incomplete. What is the default behavior of the batch job after the error is thrown?

·         All processing of the batch job stopos

72. Refer to the exhibit. What are the values of counter and stepVar variables after the Batch job?

https://miro.medium.com/max/1400/1*B6AFs-Zin4_rfRgYcExPnA.png

·         counter: 1, stepVar: null

73. Refer to the exhibit. What are the values of counter and stepVar variables in the On complete phase?

https://miro.medium.com/max/1400/1*luzRqcMSjCWmJgLAHME3WA.png

·         counter: 1, stepVar: null

74. Refer to the exhibit. The payload [1,2,3] is passed to a batch job scope. In Batch_Step_1, a variable named batchStepPayload is set to the current payload. What is the value of the last log message after one batch job complete?

https://miro.medium.com/max/1400/1*9WSWD1tTKibP218XDOahPQ.png

·         ans: 13

75. Refer to the exhibit. The Set Payload component sets the payload to Map object (not an Array). The File Write operation writes out files based on this Map object. How many files are written to the file system when the flow executes?

https://miro.medium.com/max/844/1*KBTg-00hVxOgnYqr_MT03A.png

https://miro.medium.com/max/1366/1*j1o5w6pE1oknQm4G34mf3w.png

·         Ans: 0

 

Q1.

A company has an API to manage purchase orders, with each record identified by a unique purchase order ID. The API was built with RAML according to MuleSoft best practices.

What URI should a web client use to request order P05555?

Q2.

A Database On Table Row listener retrieves data from a CUSTOMER table that contains a primary key userjd column and an increasing kxjin_date_time column. Neither column allows duplicate values.

How should the listener be configured so it retrieves each row at most one time?

Q3.

Refer to the exhibits.

What payload and quantity are logged at the end of the main flow?

Q4.

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)

Q5.

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?

Question #1

Refer to the exhibit.

The default scope in choice router recursively calls the color flow.

A web client sends a PUT request to the HTTP listener with payload Blue.

What response is returned to the web client?

Question #2

Refer to the exhibits.

The mule application is debugged in Anypoint Studio and stops at the breakpoint as shown in below exhibit.

What is the value of the payload displayed in the debugger at this breakpoint?

Correct Answer: A
Question #3

Refer to the exhibits.

The Batch job processes an array of strings.

What information is logged by the logger component after the batch job scope completes processing of the input payload?

Correct Answer: D

Question #4

Refer to the exhibits.

Set paylaod transformer is set the firstName and lastName of the customer as shown in below images.

What is the correct Dataweave expression which can be added in message attribute of a Logger activity to access firstName (which in this case is Madhav) from the incoming event?

Question #5

A REST connect module is generated for a RAML specification. and then the rest connect module is imported in mule application in Anypoint Studio. For each method of the RAML specification , what does the REST connect module provide?

Correct Answer: C

Comments

Popular posts from this blog

Mulesoft Dataweave Practice Questions-2025

1. map (Transform elements in an array or object) Map an array of numbers to their squares: Input: [1, 2, 3, 4] Output: [1, 4, 9, 16] Dataweave %dw 2.0 output application/json --- payload map ($*$) Convert an array of strings to uppercase: Input: ["apple", "banana", "cherry"] Output: ["APPLE", "BANANA", "CHERRY"] Prefix all keys in an object with "key_": Input: {"name": "John", "age": 25} Output: {"key_name": "John", "key_age": 25} Map an array of objects to only include specific fields: Input: [ {"name": "John", "age": 25, "city": "New York"}, {"name": "Jane", "age": 30, "city": "Los Angeles"} ] Output: [{"name": "John", "city": "New York"}, {"name": "Jane", "city": "Los Angeles...

Dataweave My Practice

 https://www.caeliusconsulting.com/blogs/transforming-messages-with-dataweave/ Add 1 to each value in the array  [1,2,3,4,5]              Ans: %dw 2.0 output application/json --- payload map $+ 1  2) Get a list of  id s from:                [ { "id": 1, "name": "Archer" }, { "id": 2, "name": "Cyril" }, { "id": 3, "name": "Pam" } ] %dw 2.0 output application/json --- payload map $.id   ___________________________________________________________________________________ Example 1 : Using the input data, we'll produce a patterned output based on the given array. Input: [ { "name" : "Roger" }, { "name" : "Michael" }, { "name" : "Harris" } ] Output: [ { "user 1" : "Roger" }, { "user 2" : "Micheal" }, { "user 3" : "Harris...

Mule Interview Questions

### **1. Core MuleSoft Concepts** #### **What is MuleSoft, and what are its key components?** - **MuleSoft** is an integration platform that enables organizations to connect applications, data, and devices seamlessly. - **Key Components**:   - **Anypoint Platform**: The core platform for designing, building, and managing APIs and integrations.   - **Anypoint Studio**: The IDE for developing Mule applications.   - **Anypoint Exchange**: A repository for sharing APIs, templates, and connectors.   - **Runtime Engine**: Executes Mule applications.   - **API Manager**: Manages and secures APIs.   - **DataWeave**: Transformation language for data mapping. #### **Explain the API-led connectivity approach in MuleSoft.** - **API-led connectivity** is a method of connecting data and applications through reusable APIs. - It consists of three layers:   1. **System APIs**: Expose data from core systems.   2. **Process APIs**: Orchestrate data and business logi...