0% found this document useful (0 votes)
184 views30 pages

Mulesoft Certified Developer Exam Simulation

This document contains a quiz for the Mulesoft Certified Developer – Level 1 exam. It includes 31 multiple choice questions testing knowledge of concepts like watermarking in databases, accessing variables and payloads in Mule flows, publishing APIs to Anypoint Exchange, CloudHub workers, global elements, and the Scatter-Gather routing component. The answers provided explain the thinking behind each multiple choice selection.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views30 pages

Mulesoft Certified Developer Exam Simulation

This document contains a quiz for the Mulesoft Certified Developer – Level 1 exam. It includes 31 multiple choice questions testing knowledge of concepts like watermarking in databases, accessing variables and payloads in Mule flows, publishing APIs to Anypoint Exchange, CloudHub workers, global elements, and the Scatter-Gather routing component. The answers provided explain the thinking behind each multiple choice selection.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Simulado 04 - Mulesoft Certifield Developer – Level 1

1)

2)
3) Refer to the payload. The Set payload transformer sets the payload to an object. The logger component's
message attribute is configured with the string  "Result #["INFO"++ payload]". What is the output
of logger component when this flow executes?
4)

5)

6)

7)

8)
9)

10)

11)

12)
13)

14)

15)

16)
17)

18)

19)

20)
21)

22)

23)

24)
25)

26)

27)

28)
29)

30)

31)
Gabarito

1)

Explicação
- Watermark allows the poll scope to poll for new resources instead of getting the same resource over and
over again.
- The database table must be ordered so that the “watermark functionality” can move effectively in the
ordered list. Watermark stores the current/last picked up “record id.”
- If the Mule application is shut down, it will store the last picked up “record id” in the Java Object Store and
the data will continue to exist in the file. This watermark functionality is valuable and enables developers to
have increased transparency.
- Developers do not need to create code to handle caching; it is all configurable!
- There are two columns and both are unique but user_id can't guaranty sequence whereas date_time will
always be in increasing order and table content can easily be ordered on the basis of last processed
date_time.

So correct answer is: Set the watermark column to the date_time column

On Table Row
<db:listener>
This operation selects from a table at a regular interval and generates one message per obtained row.
Optionally, you can provide watermark and ID columns. If a watermark column is provided, the values taken
from that column are used to filter the contents of the next poll, so that only rows with a greater watermark
value are returned. If an ID column is provided, this component automatically verifies that the same row is
not picked twice by concurrent polls.

Mule Ref Doc : Database Connector Reference - Mule 4 | MuleSoft Documentation

2)
Explicação
This question essentially checks the capability to retrieve value from the payload and the variable from the
mule event.

Accessing Variables
vars is the Keyword for accessing a variable, for example, through a DataWeave expression in a Mule
component, such as the Logger, or from an Input or Output parameter of an operation. If the name of your
variable is  myVar , you can access it like this:  vars.myVar
Mule Ref Doc : Variables in Mule Apps | MuleSoft Documentation

Accessing Payload
The message payload contains the content or body of a message. You can select the payload of a Mule
message through a DataWeave expression that uses the Mule Runtime variable, payload.

Mule Ref Doc : Mule Message Structure | MuleSoft Documentation

Correct answer is as below. In this case address will be stored in a variable. Hence payload will not be
overwritten and will contain order details:
{

orderkey: "payload.order",

addresskey: "vars.address"

3)

Explicação
Concatenation operation works only when both arguments are string. It throws an error when either of the
argument is object. In this case payload is object as mentioned in the question.

Hence below error will be returned by the Logger component:


You called the function '++' with these arguments:

1: String ("INFO")

2: Object ({student: {name: "Anay" as String {class: "java.lang.String"},age


4)

Explicação
API Exchange creates REST connector automatically once API is published. Hence correct answer
is Publish the API specification to Any point Exchange

Publish an API Specification


When you want to share your API specification with other developers, you can publish it to Anypoint
Exchange. Exchange creates a page that presents the project for anyone in your business group to view and
download the project from.
The page that Exchange creates for a published project includes a left pane for viewing the specification’s
documentation, a middle pane for viewing a description of the specification, and a right pane for viewing
metadata about the specification.

The left pane, which you can navigate to view the documentation. The navigation is generated from the
documentation in the specification. The middle pane, which describes the specification. You write the
description in Exchange after publishing the specification.T he right pane, which displays metadata about the
specification.

REST Connect Connector Generator


The Exchange backend uses REST Connect to transparently convert a REST API specification to a Mule 3
and Mule 4 connector. You can use this connector as you would any other in Anypoint Studio.
The Anypoint Exchange Download button lets you download the Mule 3 or Mule 4 Connector.
REST Connect does not currently support custom TLS configurations.

Access Generated Connectors


In Exchange, you can download the Mule 3 or Mule 4 connector from the Download menu:
Mule Ref Doc : REST Connect Connector Generator | MuleSoft Documentation

5)

Explicação
Mule event is correct answer.

A Mule event contains the core information processed by the runtime. It travels through components inside
your Mule app following the configured application logic.

Note that the Mule event is immutable, so every change to an instance of a Mule event results in the creation
of a new instance.

A Mule event is composed of these objects:


- A Mule Message contains a message payload and its associated attributes.
- Variables are Mule event metadata that you use in your flow.

Mule Ref Doc : Mule Events | MuleSoft Documentation


6)

Explicação
Correct answer is 0.1 vCores

CloudHub Workers
Workers are dedicated instances of Mule runtime engine that run your integration applications on CloudHub.
The memory capacity and processing power of a worker depends on how you configure it at the application
level.

MuleSoft Doc Ref : https://docs.mulesoft.com/runtime-manager/cloudhub-architecture#cloudhub-workers

Worker sizes have different compute, memory, and storage capacities. You can scale workers vertically by
selecting one of the available worker sizes:

7)
Explicação
API portal are created by API Exchange and cannot be created by Design Center.

About Design Center


Anypoint Design Center is a development environment that consists of two tools:

API Designer
API Designer enables you to create API specifications in several modeling languages, and to create RAML
API fragments. After you create a specification or fragment, publish it to Anypoint Exchange so that anyone
in your MuleSoft organization can use it.

Flow Designer
In Flow Designer, you create Mule applications to integrate systems into workflows.

8)

Explicação
Anypoint Exchange provided a way to publish , share and search API's.

Anypoint Exchange
Anypoint Exchange provides the benefit of being able to discover, share, and incorporate assets and
resources into your applications.

Anypoint Exchange helps you create API developer portals, view and test APIs, simulate data to APIs
(Mocking Service), create assets, and use API Notebooks to describe and test API functions.

Publish & Share API's : Publish Assets | MuleSoft Documentation

Search API's : Search for Assets | MuleSoft Documentation

MuleSoft Doc Ref : https://docs.mulesoft.com/exchange/

9)

Explicação
Correct answer is A global element
When we create a configuration file , that file needs to added as Global Configuration file in Global element.
A global element is a reusable object containing parameters that any number of elements in a flow can
share. You reference a global element from Anypoint

Connectors or components in your Mule application.

Global Elements
A global element is a reusable object containing parameters that any number of elements in a flow can
share. You reference a global element from Anypoint Connectors or components in your Mule application.

Use the global element to apply configuration details to multiple local elements in flows. Create one global
element that defines parameters and configuration details, and then reference the global element from any
flow element that uses this configuration. This practice enables you to ensure consistency across flow
elements.

Mule Ref Doc : Global Elements | MuleSoft Documentation

Create a Global Element


You can create global elements in two ways:

From the Global Elements tab in the Anypoint Studio canvas

From the properties panel of any connector or module that supports global elements

From the Anypoint Studio Canvas


In the Anypoint Studio visual editor, click the Global Elements tab to access a list of all global elements in an
application:

Click Create to add a new global element.

In the Choose Global Type wizard, navigate the directories or use the filter to select the type of global
element you want to create, and then click OK.

Define the configurable parameters of your global element in the Global Element Properties window.

Click OK to save.

10)
Explicação
Correct answer is Anypoint Visualizer

MuleSoft Doc Ref : https://docs.mulesoft.com/visualizer/

Anypoint Visualizer provides a real-time, graphical representation of the APIs, and Mule applications that are
running and discoverable. It also displays third-party systems that are invoked by a Mule API, proxy, or
application within your application network. The data displayed in the graph is dynamically updated and does
not require prior configuration. Additionally, the data displayed is secure, as only users with the proper
permissions can view the application network graph.

11)

Explicação
Correct answer is An Object containing all three Mule event Objects

The Scatter-Gather component is a routing event processor that processes a Mule event through different
parallel processing routes that contain different event processors. Each route receives a reference to the
Mule event and executes a sequence of one or more event processors. Each of these routes uses a
separate thread to execute the event processors, and the resulting Mule event can be either the same Mule
event without modifications or a new Mule event with its own payload, attributes, and variables. The Scatter-
Gather component then combines the Mule events returned by each processing route into a new Mule event
that is passed to the next event processor only after every route completes successfully.

The Scatter-Gather component executes each route in parallel, not sequentially. Parallel execution of routes
can greatly increase the efficiency of your Mule application and may provide more information than
sequential processing.
Sample output is as below:

MuleSoft Documentation reference : https://docs.mulesoft.com/mule-runtime/4.3/scatter-gather-concept

12)

Explicação
Correct answer is Subflow has no error handling implementation where as sync flow has.

Subflow
A subflow processes messages synchronously (relative to the flow that triggered its execution) and always
inherits both the processing strategy and exception strategy employed by the triggering flow. While a subflow
is running, processing on the triggering flow pauses, then resumes only after the subflow completes its
processing and hands the message back to the triggering flow.

Synchronous Flow
A synchronous flow, like a subflow, processes messages synchronously (relative to the flow that triggered
its execution). While a synchronous flow is running, processing on the triggering flow pauses, then resumes
only after the synchronous flow completes its processing and hands the message back to the triggering flow.
However, unlike a subflow, this type of flow does not inherit processing or exception strategies from the
triggering flow.

This type of flow processes messages along a single thread, which is ideally suited to transactional
processing.
13)

Explicação
Correct answer is Attributes are replaced with new attributes from the HTTP Request response.

Attributes include everything apart from Payload/body. For ex: Headers, query parameters, URI parameters.

So, when outbound HTTP request is made, new attributes need to pass the outbound HTTP request and old
attributes are replaced.

I have created below diagram to make it easy for you to understand:

14)

Explicação
Correct answer is Publish the API to Anypoint Exchange
Anypoint Exchange makes this possible by making it discoverable in below ways
1) In private exchange for internal developers
2) In a public portal for external developers/clients

Here is diagram created by me to help you understand sequence:


15)

Explicação
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.

Mule Ref Doc : What is a Center for Enablement (C4E) | MuleSoft Blog

16)

Explicação
Returns an array that is the result of applying a transformation function (lambda) to each of the elements.

MuleSoft Doc Ref : https://docs.mulesoft.com/mule-runtime/4.3/dataweave-cookbook-map

The map operator is a function in Dataweave which iterates over the items in an array and outputs them into
a new array. It basically accepts input as a list of items in an array and manipulates the items in the array in
order to form a new array as an output.

I have created below chart for your easier understanding:


17)

Explicação
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

18)

Explicação
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

19)

Explicação
Correct answer is Save 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.

This question tests the capability which is quite frequently used in day to day development work. Very often
you need to merge the output of different activities. In such requirements, always save response of activity to
variable so that it can be used later.
20)

Explicação
This is a trick question.

You can call only flows from DataWeave using lookup function. Note that lookup function does not support
calling subflows.
A subflow needs a parent context to inherit behaviors from such as exception handling, which a flow does
not need

Hence correct answer is Not possible in Mule 4

lookup :
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 .

The function executes the specified flow using the current attributes, variables, and any error, but it only
passes in the payload without any attributes or variables. Similarly, the called flow will only return its payload.
Note that lookup function does not support calling subflows.

Mule Ref Doc : lookup | MuleSoft Documentation

21)

Explicação
Correct answer is System layer

System APIs provide a means for insulating the data consumers from the complexity or changes to the
underlying backend systems.
MuleSoft recommends three-layered approach to API-led connectivity, highlighting the three layers:
* System APIs
* Process APIs
* Experience APIs

System APIs are the core systems of record underlying core systems of record (e.g. ERPs, key customer
and billing systems, databases, etc.). Process APIs allow you to define a common process which the
organization can share, and these APIs perform specific functions, provide access to non-central data, and
may be built by either Central IT or Line of Business IT. And finally, the Experience APIs are the means by
which data can be reconfigured so that it is most easily consumed by its intended audience, all from a
common data source.

The three-layered structure allows for a seamless flow of data from systems of record to new experiences,
and allows for reusability of assets rather than point to point connections. This approach provides a
distributed and tailored approach to architecture, greater flexibility through loose coupling, and deeper
operational visibility into what is being built.

22)

Explicação
Correct answer is Products

Modern API has three features


1) Treated as products for easy consumption
2) Discoverable and accessible through self-service
3) Easily managed for security , scalability and performance

Modern APIs have taken on some characteristics that distinguish them from poorly designed APIs of the
past:
- Modern APIs adhere to standards (typically HTTP and REST), that are developer-friendly, easily accessible
and understood broadly.
- They are treated more like products than code. APIs are designed for consumption for specific
audiences (e.g., mobile developers), they are documented, and they are versioned in a way that users can
have certain expectations of its maintenance and lifecycle.

Because they are much more standardized, today's APIs have a much stronger discipline for security and
governance, as well as monitored and managed for performance and scale.

Mule Ref Doc : What is an API? (Application Programming Interface) | MuleSoft

23)

Explicação
Correct answer is Allows CloudHub to automatically change the HTTP port to allow external clients to
connect to the HTTP Listener

This helps CloudHub to dynamically allocates a port at deployment time.

Deploying a Mule Application to CloudHub

Prerequisites
To successfully deploy your Mule application to CloudHub, consider the following requirements:
a)  The host and port number of your HTTP Listener flow sources are properly configured.
If you are using the HTTP Listener as sources for your flow, you need to set its host to 0.0.0.0 and its port
to ${http.port}. CloudHub then dynamically allocates a port at deployment time.
b) All your external classes and resources are properly declared in the  mule-artifact.json  file of your Mule
application. Due to Mule 4.x classloading isolation mechanism, all external classes and resources must be
explicitly declared in the "exportedPackages" and "exportedResources" fields on the mule-artifact.json file
before packaging and deploying the application.
MuleSoft Doc Ref : Deploying a Mule Application to CloudHub | MuleSoft Documentation

24)

Explicação
Correct answer is Nothing needs to be changed in the other APIs or their associated applications
This is the benefit of having separate interface layer. As there are no changes to interface , no changes are
required on the API's which consumes this API in context.

25)

Explicação
Correct answer is A global element

Global error handlers are to be created in global element .

Quick note to remember here is Global error handlers come in to picture only when there are no error
handlers specified as flow level.

Steps to create Global error handler


1) Click Global Elements to open Global Configuration Elements. Global Elements is located below the
Studio canvas
2) In Global Configuration Elements, click Create to open the Choose Global Type dialog.

3) From the dialog, select Global Configuration -→ Configuration, and then click OK to open


the Configuration dialog.
4) From the select Configuration dialog, select allErrorHandler for the Default Error Handler field, and
click OK.

26)

Explicação
File is not modified when FTP read operations is performed. Hence correct answer is The file stays in the
same folder unchanged.

MuleSoft Doc Ref : https://docs.mulesoft.com/file-connector/1.3/file-read

27)

Explicação
Correct answer is MAJOR

MAJOR version when you make incompatible API changes,


MINOR version when you add functionality in a backwards compatible manner, and
PATCH version when you make backwards compatible bug fixes.

For details refer to this documentation : https://semver.org/

28)

Explicação
Empty array is returned when no rows are matched.
MuleSoft Doc Ref : https://docs.mulesoft.com/db-connector/1.9/database-connector-select

29)

Explicação
Correct answer is APIKIt Creates a separate flow for each HTTP method

About Generating RAML-based Flows

From a RAML specification, the APIkit scaffolding technique typically generates the following components in
APIkit 4.x:

- An archetype

  Basic configuration files plus a Mule XML configuration (Mule code)


- An implementation of the API
   1) HTTP listener and APIkit router : For routing and binding to RAML resources.
   2) An API Console : For simulating calls to the API using the mocking service.
   3) Flows : A mock implementation. Later you need to add the business logic to the flows.
In Studio, the APIkit project looks something like this:
A flow is generated for each resource method:

The generated, minimal flows meets the communication operations required by a REST contract.

30)

Explicação
Mulesoft advocates for users to adopt a "design first" approach to creating API’s. A "design first" approach is
used to enable API consumers the ability to understand, interact, and solicit feedback on the proposed API
contract prior to the development effort.

Hence correct answer is Create an API specification and get feedback from stakeholders

31)

Explicação
The latest version of the RAML specification is 1.0
You can check RAML version in RAML definition by referring to first comment. See highlighted part in below
image.

You might also like