Mule 3 Fundamentals: Introducing API-Led Connectivity: Quiz

 Module 1: Mule 3 Fundamentals: Introducing API-Led Connectivity: Quiz

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

A1: System.

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

Q3: What statement is part of MuleSoft’s description of an application network?
A3: Create reusable APIs and assets designed to be consumed by other business units.

Q4: According to MuleSoft, what is the Center for Enablement’s role in the new IT operating model?
A4: Creates and manages discoverable assets to be consumed by line of business developers.

Q5: What is the format of documents exchanged in a SOAP request/response interaction?
A5: WSDL

Q6: What is the main purpose of Flow Designer in Design Center?
A6: Design and develop fully functional Mule applications in a hosted development environment.

Q7: What is the maximum number of Mule applications that can be run in a CloudHub Worker?
A7: 1

Q8: Which MuleSoft product enables publishing, sharing, and searching of APIs?
A8: API Exchange

Q9: Which asset can NOT be created using Anypoint Platform Design Center?
A9: API Portals

Q10: What language does the Transform component use to define data transformation?
A10: DataWeave.

Module 2: Mule 3 Fundamentals: Designing APIs: Quiz

Q1: In a RAML specification, what attribute defines a query parameter to be optional for a resource?
A1: required: false

Q2: What is the correct URL to perform a GET request to /patients?
A2: ‘http://dev.acme.com/api/patients?year=2016’

Q3: A RAML example fragment named BankAccountsExample.raml is placed in the examples folder in an API specification folder. What is the correct syntax for to reference the fragment?
A3: example: !include examples/BankAcountsExample.raml

Q4: The following is wrong. How do we fix it?
A4: Indent “get” method under {flight_id} resource one level down (to the right)

Q5: What is a valid way to represent this XML example in RAML?
A5:
music:
    collection: Classic Rock
    artists:
        artist: Deep Purple
        artist: Rainbox

  Top 70 frequently asked mulesoft interview questions & answers for freshers & experienced professionals


Module 3: Mule 3 Fundamentals: Building APIs: Quiz

Q1: What is the purpose of the router element in APIkit?
A1: Validates the requests against RAML API specifications and routes them to API implementation.

Q2: What is NOT part of a Mule 3 message?
A2: Variables

Q3: What is part of a Mule 3 message?
A3: Payload, Inbound Properties, Outbound Properties, Attachments.

Q4: What is the minimum required configuration in a flow for a Mule application to compile?
A4: A message processor in the Process section of a flow.

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

Module 4: Mule 3 Fundamentals: Deploying and Managing APIs: Quiz

Q1: What out-of-the-box policy can safeguard against Denial of Service type attacks?
A1: Rate limiting.

Q2: A Mule application properties file named training-DEV.properties has been defined. How is the properties’ file referenced in the Mule applications?
A2: In a Property Placeholder element

Q3: What reserved property can be used in a Mule application to allow a HTTPS Listener to be accessed by external web client after the Mule application is deployed to CloudHub?
A3: ${https.port}

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

Q5: What is NOT a role of an API proxy application running in a Mule runtime?
A5: Determine which response message is allowed to pass back from the API backend service

Q6: What is a role of an API proxy application running in a Mule runtime?
A6.1: Determine which request message is allowed to pass through to the API backend service.
A6.2: Apply runtime policies to enforce governance.
A6.3: Measure the traffic flowing through to the API backend service.

Module 5: Mule 3 Fundamentals: Accessing and Modifying Mule Messages: Quiz

Q1: What happens to the outbound properties of a Mule message after completing an outbound HTTP Request?
A1: All previous outbound properties are removed.

Q2: What message processor can set the HTTP response status code to 200?
A2: Property

Q3: A web service implements an API to handle request to: ‘http://acme.com/customers/{state}’.
A web client makes a request to: ‘http://acme.com/customers/CA’.
What is the correct MEL expression to retrieve the value CA?
A3: #[message.inboundProperties.’http.uri.params’.state]

Q4: What property of a Mule message is immutable?
A4: Inbound properties.

Q5: What is the correct Mule expression for accessing the city Cleveland from the JSON payload?
[
  {
    ...
  },
  {
    ...
    "city": "Cleveland",
    ...
  },
  ...
]
A5: #[message.payload[1].city]

Module 6: Mule 3 Fundamentals: Structuring Mule Applications: Quiz

Q1: A mule application has two flows named parentFlow and childFlow. A flow variable is defined in parentFlow. What is the scope of the flow variable when the parentFlow calls childFlow using a flow reference?
A1: The flow variable is accessible in childFlow, can be changed, and changes are seen back in the parentFlow.

Q2: What is true for a Mule subflow?
A2: It is executed synchronously.

Q3: What is false for a Mule subflow?
A3-1: It can have its own exception strategy.
A3-2: An external client can send messages directly to it.
AS-3: It must be in the same configuration file as the parent flow.

Q4: What is the default processing strategy of a one-way flow?
A4: Queued-asynchronous.

Q5: What is required for two Mule applications to share data using a VM connector component?
A5: Put the Mule applications in the same non-default Mule domain.

Module 7: Mule 3 Fundamentals: Consuming Web Services: Quiz

Q1: How are outbound properties automatically passed to an outbound REST request using an HTTP Request component?
A1: As headers

Q2: From the below, what is the URL to get patient information for patient 49284?
/patient/{id}
  uriParameters:
    id:
      displayName: Patient ID
  get:
    queryParameters:
      hospital:
        type: number
       required: true
       description: Hospital ID the patient belongs to
    date:
      type: date-only
      required: false
      description: Date the patient was serviced
A2: /patient/49284?hospital=984

Q3: 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?
A3: In the message payload.

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

Q5: What is NOT a way to pass data to a RESTful web service in a flow using an outbound HTTP Request component?
A5: Set inbound properties before the HTTP Request component.

Q6: What ways are there to pass data to a RESTful web service in a flow using an outbound HTTP Request component?
A6-1: Set URI parameters in the HTTP Request component.
A6-2: Set query parameters in the HTTP Request component.
A6-3: Set outbound properties before the HTTP Request component.

Interested in learning the Mulesoft Course ? Enroll in our MulesoftTraining program now!



Module 8: Mule 3 Fundamentals: Handling Errors: Quiz

Q1: An exception is caught by a choice exception strategy. How is the exception routed?
A1: To the first exception strategy whose condition evaluates to true.

Q2: The Groovy component in Flow2 causes an exception to be thrown. What is the expect payload that will be returned by the HTTP endpoint?
A2: FLOW 1

Q3: How is a default exception strategy set in a Mule application?
A3: In a configuration global element in any Mule configuration XML file.

Q4: The mainFlow calls childFlow, which throws an exception. What log message is NOT printed out after childFlow throws an exception?
+ defaultExceptionStrategy
^ mainFlow: Choice Exception Strategy
^ childFlow
A4: Catch mainFlow exception.

Q5: What happens to the Mule application when the JMS server goes offline while there are no pending client requests being processed?
A5: Neither of the two exception strategies is called - the application continues running!

Module 9: Mule 3 Fundamentals: Controlling Message Flow: Quiz

Q1: How are conditions used in a Choice flow control?
A2: To find the first true condition, then routes the message to the matched Choice target message processor.

Q2: 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?
A2: An array of JSON objects.

Q3: How is a data collection routed in a Scatter-Gather flow control?
A3: The entire message is sent to each route and processed in parallel.

Q4: 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?
A4: All subsequent message processors are skipped.

Q5: What message processor will throw an exception if a message payload is not a number?
A5: Is Number validator

Module 10: Mule 3 Fundamentals: Writing DataWeave Transformations: Quiz

Q1: What is the result of the DataWeave code?
%dw 1.0
%output application/xml
---
{
  "fName":  "John",
  "lName": "Doe"
}
A1: An exception!
Remember: When mapping array elements (JSON or JAVA) to XML, wrap the map operation in {(...)}

Q2: What type of output results when the DataWeave expression is applied to the sample payload?
A2: Array

Q3 (top of image): What is valid DataWeave to access the individual elements of empDetails and convert the output to JSON?
A3 (bottom of image):

Q4: With the following structure, what DataWeave expression results in an ArrayList containing all albums and all artists?
A4: payload.music.artists.*artist.discography.*album

Q5: The correct way to format the decimal 20.3844 as a string to two decimal places?
A5: 20.3844 as :string {format: " .0#"}

Module 11: Mule 3 Fundamentals: Connecting to Additional Resources: Quiz

Q1: The JMS is set for one-way communication. In what order are entries added to the application log?
A1: Entry, Exit, JMS Start, JMS End

Q2: A Mule flow has a JMS queue listener as the message source. Where can the next message processor access a JMS message’s header?
A2: Inbound property

Q3: What part of a Mule flow can contain a Poll scope?
A3: Message source

Q4: How is a Poll scope’s watermark accessed from a message processor in a flow?
A4: In a flow variable.

Q5: A file connector is configured to read files from a /mule/input directory. All other File connector settings are default settings. What happens to a file after it is processed by the File connector?
A5: The file is deleted from the input directory, but is not moved anywhere.

Module 12: Mule 3 Fundamentals: Processing Records (Batch): Quiz

Q1: What phase of a batch job using a Batch scope must contain at least one message processor?
A1: Process Records.

Q2: 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?
A2: The payload returns to the original payload.

Q3: 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 behaviour after the exception is thrown?
A3: Stops processing the entire batch job.

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







A4: In all batch steps but not in the On Complete phase.

No comments:

Powered by Blogger.