Refer to the exhibits.
A web client submits a request to http://localhQst:8081 /flights. What is the result at the end of the flow?
Refer to the exhibit.
What payload is returned from a request to http//localhost.8081/
Refer to the exhibits, what payload is returned from a request to http://localhost;8081/?
The flow can be described as below. 1) First HTTP POST requets is made in which paylaod is set to 1 and it gets returned to our mail flow. 2) Second call is initiated for JMS Publish Consume JMS: num1 which add 1 to the payload which makes it as 2. Note that pubih consume is a synchronous operation. Hence paylaod is returned to main flow. 3) Third call is initiated for JMS Publish JMS: num2 which add 1 to the payload . Note that pubih is asynchronous operation. Hence paylaod is never returned to main flow. So payload in main flow is still 2. 4) Finally Set Payload increments payload by 1 making payload as 3 which is returned by the flow. Hence option 3 is the correct answer.
How would you debug Mule applications?
Debugger can be used to debug applications to see event data movine from one flow to other
Refer to the exhibits.
What payload and quantity are logged at the end of the main flow?
Refer to the exhibits. The Set Payload transformer in the addltem child flow uses DataWeave to create an order object.
What is the correct DataWeave code for the Set Payload transformer in the createOrder flow to use the addltem child flow to add a router call with the price of 100 to the order?
Mule application contains ActiveMQ JMS dependency. Mule application was compiled and run successfully in Anypoint Studio. The mule application must now be exported from Anypoint Studio and shared with other developer. What export options should be selected to create the smallest JAR file that can be imported into other developer's Anypoint Studio and run successfully?
Correct answer is Select only Attach Project Sources only
You must keep the Attach Project Sources option selected to be able to import the packaged JAR file back into a Studio workspace.
Deselect the Include project modules and dependencies option.
This option skips bundling the actual modules and external dependencies required to run the Mule application in a Mule runtime engine, creating a lightweight JAR file package that does not include any dependencies specified in the Mule application’s pom.xml file.
The generated JAR file is not a functional deployable archive and cannot be deployed to a Mule runtime engine, but instead offers a way to archive only the source files that make up the Mule application. This is the same as using the -lightWeightPackage flag when packaging using the Mule Maven Plugin and is useful if you want to distribute your project to other Studio installations because it only keeps a reference to all its dependencies. When you import a lightweight package into Studio, all your dependencies are automatically downloaded
MuleSoft Doc Ref : https://docs.mulesoft.com/studio/7.8/import-export-packages
What is the purpose of the api:router element in APIkit?
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.
Pick the component with which DataWeave is tightly integrated.
Correct answer is Mule runtime
DataWeave is the MuleSoft expression language for accessing and transforming data that travels through a Mule app. DataWeave is tightly integrated with the Mule runtime engine, which runs the scripts and expressions in your Mule app.
Mule Doc Reference : https://docs.mulesoft.com/mule-runtime/4.3/dataweave
What should this endpoint return considering the API is build using standard practices?
Correct answer is Patients from year 2021.
The thing to note here is that year is not a query parameter and not the uri parameter. Hence it will filter all the patients and return the ones for whom year is 2021
A RAML example fragment named StudentExample.raml is placed in the examples folder in an API specification project. What is the correct syntax to reference the fragment?
To include property. To keep the API definition concise, you can include external content, such as documentation, schemas, and frequently used patterns outside the definition itself. The parser interprets !include as if the content of the externally-hosted file or a URL were declared in-line.
To use the fragments in RAML you have to include the exact path(copy the path) of that fragment you want to use as shown below
Option 3 is the correct as correct syntax is
examples: !include examples/StudentExample.raml
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
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?
Option 1 is the only correct choice due to two reasons. 1) Concatenation is always with ++ sign and not with + sign which makes option 2 and 3 wrong 2) hearders can be accessed with attributes. headers and not with only headers which makes option 4 incorrect
According to Semantic Versioning, which version would you change for incompatible API changes?
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/
How does APIkit determine the number of flows to generate from a RAML specification?
APIKIt Creates a separate flow for each HTTP method
Which out of below is not an asset?
Exchange is the odd man out here. Rest all are type of asset
Graphical user interface, application Description automatically generated
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?
In case of an error , batch job completes in flight steps and stops further processing.
MuleSoft Doc Ref : Handling Errors During Batch Job | MuleSoft Documentation
The default is all processing will stop but we can change it by Max Failed Record field.
General -> Max Failed Records: Mule has three options for handling a record-level error: Finish processing, Continue processing and Continue processing until the batch job accumulates a maximum number of failed records. This behavior can be controlled by Max Failed Records.
The default value is Zero which corresponds to Finish processing.
The value -1, corresponds to Continue processing.
The value +ve integer, corresponds to Continue processing until the batch job accumulates a maximum number of failed records
A shopping API contains a method to look up store details by department.
To get the information for a particular store, web clients will submit requests with a query parameter named department and uri parameter named storeId
What is valid RAML snippet that supports requests from a web client to get a data for a specific storeId and department name?
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.
Sample output is as below
Table Description automatically generated with low confidence
MuleSoft Documentation reference : https://docs.mulesoft.com/mule-runtime/4.3/scatter-gather-concept
Refer to the exhibits.
The mule application implements a REST API that accepts GET request from two URL's which are as follows
What path value should be set in HTTP listener configuration so that requests can be accepted for both these URL's using a single HTTP listener event source?
Correct answer is */status as it is the correct way to use wildcards while configuring path value in HTTP listener
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.
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:
Table Description automatically generated
According to MuleSoft, what is the Center for Enablement’s role in the new IT operating model?
Correct answer is Creates and manages discoverable assets to be consumed by line of business developers.
C4E does not get directly involved in projects.
Refer to the below exhibit. A Mule application configures a property placeholder file named config.yaml to set some property placeholders for an HTTP connector.
What is the valid properties placeholder file to set these values?
Correct answer is as below as it follows the correct syntax
host : "localhost"
port : "8081"
Refer to the exhibits.
The Validation component in the private flow throws an error. What response message is returned to a client request to the main flow's HTTP Listener?
Error in validation component will get processed by Processer level On Error Propagate block and then error will be rethrown which will get processed by flow level error handler which will set payload to "Error- main flow". Hence correct answer is Error - main flow
1) Request is received by HTTP listener
2) Try scope gets executed
3) The validator component in the Try scope creates an Error Object because the payload is not null.
4) The On Error Propagate handles the error. The payload is set to “Error – Try scope”
6) “Error – Try scope” is returned to the 'On Error Continue' block. Main flow execution stops. Payload is set to "Error - main flow"
7) “Error - main flow” is returned to the requestor in the body of the HTTP request. HTTP Status Code: 200
Reference Diagram though not exactly same, conditions are similar. They will help you answer any new question on error handling in real exam:
Timeline Description automatically generated
A Utility.dwl file is located in a Mule project at src/main/resources/modules. The Utility.dwl hie defines a function named pascalize that reformats strings to pascal case.
What is the correct DataWeave to call the pascalize function in a Transform Message component?
Refer to exhibits.
In the execution of the Scatter-Gather , the flow route completes after 10 seconds and the flow2 route completes in 40 seconds. How many seconds does it take for the Scatter-Gather to complete?
Scatter-Gather sends the event to each routes concurrently. Hence both route in this example will start in parallel. So total time to complete processing is 40 seconds which is option 3
How many Mule applications can run on a CloudHub worker?