MuleSoft MCD - Level 1 Practice Test - Questions Answers, Page 16
List of questions
Related questions
Question 151
What is the difference between a subflow and a sync flow?
Explanation:
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
Question 152
What happens to the attributes of a Mule event in a flow after an outbound HTTP Request is made?
Explanation:
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:
Question 153
An API has been created in Design Center. What is the next step to make the API discoverable?
Explanation:
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:
Question 154
What is the output of Dataweave Map operator?
Explanation:
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:
Question 155
How can you call a subflow from Dataweave?
Explanation:
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
Question 156
What MuleSoft API-led connectivity layer is intended to expose part of a backend database without business logic?
Explanation:
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.
Question 157
According to Mulesoft, how are Modern APIs treated as?
Explanation:
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
Question 158
Refer to the exhibits.
This main mule application calls a separate flow called as ShippingAddress which returns the address corresponding to the name of the user sent to it as input. Output of this ShippingAddress is stored in a target variable named address.
Next set of requirement is to have a setPayload transformer which will set below two values
1) orderkey which needs to set to be equal to the order element received in the original request payload.
2) addressKey which needs to be set to be equal to the address received in response of ShippingAddress flow
What is the straightforward way to properly configure the Set Payload transformer with the required data?
A mule application is being developed which will process POST requests coming from clients containing the name and order information. Sample request is as below
Explanation:
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'
}
Question 159
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 when this flow executes?
Explanation:
Correct answer is as below as concatenation operation works only with string and not with the objects. In this case payload is object.
'You called the function '++' with these arguments:
1: String ('INFO')
2: Object ({student: {name: 'Anay' as String {class: 'java.lang.String'},age
Question 160
According to Semantic Versioning, which version would you change for incompatible API changes?
Explanation:
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/
Question