MCD Level 1 - Part 3 Flashcards
What valid RAML retrieves details on a specific customer by its customerId as a URI parameter?
/customers: /{customerId}: get:
A web client submits a request to http://localhost:8081?accountType=personal. The query parameter is captured using a Set Variable transformer to a variable named accountType. What is the correct DataWeave expression to log accountType?
vars: 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
Hence correct answer is Account Type: #[vars.accountType]
Which of the below is not the mandatory configurations for HTTP Listener?
Allowed methods is an optional configuration. If nothing is specified then all HTTP methods are supported.
Rest all are mandatory.
Refer to the exhibits. What is valid text to set the user field in the Database connector configuration to the username value specified in the config.yaml file?
${db.username}
As a part of requirement , application property defined below needs to be accessed as Dataweave expression. What is the correct expression to map it to port value?
Correct answer is { port : p(‘db.port’)}
This function returns a string that identifies the value of one of these input properties: Mule property placeholders, System properties, or Environment variables.
The p function returns a null value if the property is not set or if the function does not find the property.
Refer to the exhibits. A web client submits the request to the HTTP Listener. What response message would be returned to web client?
Correct answer is String is not blank.
As no error handling is provided. Default error is sent back which is String is not blank
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: ” ++ headers.’content-type’]
Correct answer is #[“Content-Type: ” ++ attributes.headers.’content-type’]
Reason in as below
1) Concatenation is always with ++ sign and not with + sign which makes two of the options incorrect
2) Headers can be accessed with attributes.headers and not with only headers which makes below option incorrect
What is the object type returned by the File List operation?
Array of Mule event objects
Where would you create SLA Tiers for an API?
SLA Tiers are created in API Manager.
MuleSoft Doc Ref : https://docs.mulesoft.com/api-manager/2.x/policy-mule3-tutorial-manage-an-api#to-add-the-tier
Steps to create SLA Tier are as follows:
1) In API Manager, in API Administration, click a version.
2) Check that the API supports resource-level policies: On the API version details page, in Status, click Configure Endpoint, and check that Type is RAML.
3) Choose the SLA Tiers, and click Add SLA Tier. Set up limit on SLA tier
What is the default port used by Mule application debugger configuration in Anypoint Studio?
6666
Which of the module is imported automatically in Dataweave scripts?
Correct answer is Core (dw::Core)
This module contains core DataWeave functions for data transformations. It is automatically imported into any DataWeave script.
What is minimal requirement in a flow for a Mule application to compile?
Each flow must have one or more Event Processor section to get compiled successfully.
Where is metadata stored in a Mule project
Metadata is stored in application-types.xml flle located under src/main/resources.
Mule 4 applications contain an application-types.xml file, which is where metadata around your data types is stored. For example, if you create a new CSV type, that metadata will be added to this file. This new file is easy to share, commit, and merge when conflicts arise, which enables you to do more metadata-driven development.
MuleSoft Doc Ref : https://docs.mulesoft.com/mule-runtime/4.3/intro-studio#metadata-storage
Which of the below is not a valid category for connector type?
Gold
Gold is not valid category for connector types.
What is the purpose of the api:router element in APIkit?
Correct answer is Validates requests against RAML API specifications and routes them to API implementations
The APIkit Router is a key message processor that validates requests against the provided definition, enriches messages (for example by adding default values to the messages) and routes requests to a particular flow. Also, the Router raises errors messages if errors occurs while routing, validating or processing the user request.
There are three routes configured for Scatter-Gather and incoming event has a payload is an Array of three objects. How routing will take place in this scenario?
Entire event would be sent to each route in parallel.
Scatter-Gather works as follows :
– The Scatter-Gather component receives a Mule event and sends a reference of this Mule event to each processing route.
– Each of the processing routes starts executing in parallel. After all processors inside a route finish processing, the route returns a Mule event, which can be either the same Mule event without modifications or a new Mule event created by the processors in the route as a result of the modifications applied.
– After all processing routes have finished execution, the Scatter-Gather component creates a new Mule event that combines all resulting Mule events from each route, and then passes the new Mule event to the next component in the flow.
Which of the below is used by Mule application to manage dependencies which make sharing the projects lightweight and easier
POM.xml contains info about the project and configurationn details used by Maven to build the project
What module and operation will throw an error if a Mule events payload is not null?
Correct answer is Validation module’s Is Null operation
Validate Null Fails if the value is not null and not an instance of NullPayload
From which application , Organization Administrators can approve/revoke/delete SLA tier access requests
Organization Administrators can approve/revoke/delete SLA tier access requests via API Manager only
What is not the function of API Gateway ?
Correct answer is Specify throttling , security and other policies
MuleSoft Doc Ref : https://docs.mulesoft.com/api-manager/2.x/api-gateway-capabilities-mule4
API Gateway is responsible for below functions.
1) Determine which traffic is authorized
2) Meter the traffic
3) Logs transaction
4) Apply throttling and other policies (Not specifying. These are specified in API Manager)
What of the below is not a feature of API Notebooks?
Correct answer is Creates a mock service for an API
API Notebook is an open source, shareable web application for API documentation, interactive API tutorial and example generatation, and a client for your API endpoints. Using API Notebook, you can make requests and quickly transform the responses into readable format. However it cannot be used to mock service for an API.
An SLA based policy has been enabled in API Manager. What is the next step to configure API proxy to enforce new SLA policy
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:
What is the use of DevKit in Mule 4?
The MuleSoft Anypoint DevKit, or simply DevKit, enables the development of MuleSoft Anypoint Connectors. But it is supported only in Mule 3. Mule 4 uses Mule SDK to create custom connectors.
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?
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.
To avoid hard-coding values, a flow uses some property placeholders and the corresponding values are stored in a configuration file. Where does the configuration file’s location need to be specified in the Mule application
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.
What is the output of Dataweave Map operator?
Returns an array that is the result of applying a transformation function (lambda) to each of the elements.
A Mule flow has three Set Variable transformers. What global data structure can be used to access the variables?
Mule event is correct answer. Mule event has two parts which are as follows 1) Message (which contains payload and attributes like headers and query/uri parameters 2) Variables