Mulesoft MCD Level 1 Flashcards
Which of the following is invalid type of event processor which can be used as a router ?
Pick First is not valid type. Rest three are valid types of routers
Choice Router
The Choice router dynamically routes messages through a flow according to a set of DataWeave expressions that evaluate message content. Each expression is associated with a different routing option. The effect is to add conditional processing to a flow, similar to an if/then/else code block in most programming languages.Only one of the routes in the Choice router executes, meaning that the first expression that evaluates to true triggers that route’s execution and the others are not checked. If none of the expressions are true, then the default route executes.
Round Robin Router
The Round Robin router iterates through a list of two or more routes in order, but it only routes to one of the routes each time it is executed. It keeps track of the previously selected route and never selects the same route consecutively. For example, the first time Round Robin executes, it selects the first route. The next time, it selects the second route. If the previously selected route is the last route in the list, Round Robin jumps to the first route.
First Successful Router
The First Successful router iterates through a list of configured processing routes until one of the routes executes successfully. If any processing route fails execution (throws an error), the router executes the next configured route. If none of the configured routes execute successfully, the First Successful router throws an error.
What module and operation will throw an error if a Mule events payload is not null?
Validate Null Fails if the value is not null and not an instance of Null Payload.
The Validations module provides an easy out-of-the-box way to verify that the content of a message in your flow matches a given set of criteria.
The validations module was designed
following these principles:
1) If the message doesn’t meet the specified criteria, the validation fails and a ValidationException is thrown.
2) By default, this exception has a meaningful message attached. You can optionally customize this message and change the type of exception thrown, as long as the new exception type has a constructor that overrides Exception(String).
Validate Null Fails if the value is not null and not an instance of Null Payload.
Which file is used to define the interface contract to invoke a web service implemented as a SOAP service?
WSDL is used to define the contract in case of SOAP . RAML/OAS is used to define contract for REST services.
WSDL stands for Web Services Description Language. It is the standard format for describing a web service. WSDL was developed jointly by Microsoft and IBM.
Features of WSDL :
– WSDL is an XML-based protocol for information exchange in decentralized and distributed environments.
– WSDL definitions describe how to access a web service and what operations it will perform.
– WSDL is a language for describing how to interface with XML-based services.
– WSDL is an integral part of Universal Description, Discovery, and Integration (UDDI), an XML-based worldwide business registry.
– WSDL is the language that UDDI uses.
What is the trait name you would use for specifying client credentials in RAML?
Correct answer is client-id-required
When applying a client ID-based policies implies that all requests coming to your API include a client ID and client Secret (by default expected as query parameters). To prevent user requests from being rejected, create a trait in the RAML root and then reference this trait in every operation of your API. The trait might look like this:
traits:
– client-id-required:
queryParameters:
client_id:
type: string
client_secret:
type: string
And then you can apply this trait in each individual operation like this:
/products:
get:
is: [client-id-required]
description: Gets a list of all the inventory products.
Which of the below is not the function of API Gateway ?
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)
Hence specify throttling , security and other policies is the correct answer here as it is not function of API Gateway
What is the main purpose of flow designer in Design Center?
Its primary function is to design and develop fully functional Mule applications in a hosted development environment
In Flow Designer, you create Mule applications to integrate systems into workflows. You create them as projects that have one or more flows
Overview of Flow Designer
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: Asynchron
Correct answer is Publish consume: Synchronous. Publish: Asynchronous.
Request and reply is a very common pattern between applications, thus the JMS connector provides the publish-consume operation specifically for that. The publish-consume operation lets you publish a message to any destination, and then wait for a reply on a different destination
For the cases where you need an asynchronous reply to the Message being sent, the JMS publish operation allows us to declare any reply-to destination. This destination will be communicated as a JMS Header to the consumer of the Message, and is the destination were we should expect a reply to be sent.
Where is metadata stored in a Mule project ?
Where is metadata stored in a Mule project ?
What is the object type returned by the File List operation?
Correct answer is Array of Mule event objects
The List operation returns an array of messages in which: Each message holds the file’s content in its payload. The file’s attributes section carries the file’s metadata (such as name, creation time, and size). The payload is empty if the element is a folder.
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.
Where would you create SLA Tiers for an API?
SLA Tiers are created in API Manager.
To add an SLA tier:
From the left menu in API Manager, click API Group.
Expand the API Group list and click the API Group instance to which you want to add the SLA tier.
From the left menu, click SLA Tiers and then click Add SLA tier on the details page.
The illustration shows the Add SLA tier window.
What is the purpose of the api:router element in APIkit?
he 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.
Which of the below is not a valid category for connector support type?
Connectors fall into one of the following categories.
Community
MuleSoft or members of the MuleSoft community write and maintain the Community connectors. Connectors built by the community or MuleSoft are generally open-source, although each package may vary. Partner-built connectors may not be open-source. Contact the partner directly for more information. You do not need any special account or license to use a Community connector.
MuleSoft Certified
For MuleSoft Certified connectors are developed by MuleSoft’s partners and developer community and are reviewed and certified by MuleSoft. For support, customers should contact the MuleSoft partner that created the MuleSoft Certified connector.
Select
MuleSoft maintains Select connectors. Connectors included in the open source Mule distribution can be used by everyone, however support is only included in an Anypoint Platform subscription. To use all other Select Connectors and access support, you must have an active Anypoint Platform subscription.
Premium
MuleSoft maintains Premium connectors; you must have an active CloudHub Premium plan or an Enterprise subscription with an entitlement for the specific connector you wish to use.
What is the default port used by Mule application debugger configuration in Anypoint Studio
Anypoint Studio Visual Debugger allows you to run your application in Debug mode, setting breakpoints to stop execution to check the contents of an event at a previously-specified event processor.
When debugging on your local machine, Studio Visual Debugger listens for incoming TCP connections on localhost port 6666. This port must be available on your machine. This means not blocked by a firewall or other security software.
If you plan to remotely debug an application running in an external Mule server, you will need connectivity between your machine and the server’s debug port, which by default is configured to 6666.
What statement is a part of MuleSoft’s description of an application network?
Correct answer is Creates reusable APIs and assets designed to be consumed by other business units.
Expectations from an application network as per Mulesoft are as follows
In order to serve the needs of the business and provide the benefits that organizations need to thrive in today’s connected, competitive environment, an application network must be:
› Clearly defined: A well-defined operating model enables the business to get the most value from the IT assets on the network.
› Broadly deployed: It empowers the whole organization not just IT — to discover and access the data and assets tofuel applications, reporting, analytics, business processes and automation.
› Accessible and modular: Every application is accessible and recomposable to fit the rapidly changing needs of the business.
› Seamless: Is a seamless network of applications, data sources, devices and APIs, whether in the cloud or on premises, home-grown or acquired.
› Elastic: The application network is elastic and can grow or shrink depending on the demands of its consumers.
› Scalable: It allows companies to introduce new applications more easily because the application network already defines how to access, expose and share new application data.
› Secure: It can be organized to reflect the security and governance constraints in a business of any size.
› Monitored end to end: Data running through the network can be tracked end-to-end, monitored and analyzed. The impact of a request from one node in the network can be traced back to all the other nodes that take part in that request. Analytical: The network understands dependencies between applications and can perform impact analyses on changes made to applications on the network. This gives organizations a real-time enterprise wiring diagram that can be inspected. Measurable: The value of an application network can be explicitly measured through a set of built-in KPIs that track reuse, utilization, adoption and redundancy.
› Organic growth and reuse: As the first applications are connected to the application, data and functionality is made available for reuse. IT and the business can plug in more applications over time. Each application adds more value to the network, more reusable building blocks for building applications, services, and business processes. The business and IT can use the existing assets to build new assets which are also made available through the application network.
How are multiple conditions used in a Choice router to route events?
Choice router finds the FIRST true condition, then distribute the event to the ONE matched route.
The Choice router dynamically routes messages through a flow according to a set of DataWeave expressions that evaluate message content. Each expression is associated with a different routing option. The effect is to add conditional processing to a flow, similar to an if/then/else code block in most programming languages.
Only one of the routes in the Choice router executes, meaning that the first expression that evaluates to true triggers that route’s execution and the others are not checked. If none of the expressions are true, then the default route executes.
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.
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.
The following diagram details the behavior of the Scatter-Gather component:
- 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.
A Batch Job scope has five batch steps. An event processor throws an error in the second batch step 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 stops is the correct answer.
Batch Processing Strategies for Error Handling
Mule has three options for handling a record-level error:
Finish processing (Default behavior) Stop the execution of the current job instance. Finish the execution of the records currently in-flight, but do not pull any more records from the queues and set the job instance into a FAILURE state. The On Complete phase is invoked.
Continue processing the batch regardless of any failed records, using the acceptExpression and acceptPolicy attributes to instruct subsequent batch steps how to handle failed records.
Continue processing the batch regardless of any failed records (using the acceptExpression and acceptPolicy attributes to instruct subsequent batch steps how to handle failed records), until the batch job accumulates a maximum number of failed records at which point the execution will halt just like in option 1.
By default, Mule’s batch jobs follow the first error handling strategy which halts the batch instance execution
Which keyword do you use to create a new function in DataWeave?
fun is the correct answer.
You can define your own DataWeave functions using the fun declaration in the header of a DataWeave script. Sample is as below. —————————————- %dw 2.0 output application/json fun toUpper(aString) = upper(aString) — toUpper(“hello”)
What of the below is not a feature of API Notebooks?
API Notebook is an open source, shareable web application for API documentation, interactive API tutorial and example generation, 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.
Hence correct answer is Creates a mock service for an API
What is minimal requirement in a flow for a Mule application to compile?
Process section is must to get compiled. Process section must have one or more processors. Event source and error handling are optional areas.
Mule application is a sequence of Mule event processors. Mule event processors
Flow has three main areas
Source : Controls how a flow is triggered
Process : This determines the business logic implementation
Error : Handling of errors