Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 5

1.

In an Application Network, if the implementation but not the interface of a


product API changes, what needs to be done to the other APIs that consume the
Product API?

2. There are 2 flows - mainFlow, childFlow.


mainFlow: HTTP Listener GET /vehicles -> Set Payload "Cars" -> Set Variable "model"
-> Flow Reference child
childFlow: Logger component

A web client sends a GET request to the main flow's HTTP Listener that includes a
make query parameter.
What values are accessible in the child flow?

3. mainFlow: HTTP Listener POST / -> Try is null payload On Error Propogate Set
Payload "ERROR1" -> Set Payload "End"
Error Handling: On Error Continue "Error2"

A web client sends a POST request to the HTTP Listener and the

Validation component in the Try scope throws an error.

What response message is returned to the web client?

4.
mainFlow: HTTP GET /pianos -> Set Payload "Piano Pedigrees" -> Set Variable
"producer" -> Request POST HTTP /child
childFlow: HTTP POST /child -> Logger component

The main flow contains an HTTP Request in the middle of the flow.
The HTTP Listeners and HTTP Request use default configurations.

A web client submits a request to the main flow's HTTP Listener that includes query
parameters for the pedigree of the piano.

What values are accessible to the Logger component at the end of the main flow?

5. What is the correct syntax for a Logger component to output a message with the
contents of a JSON Object payload?

6. A Mule project contains a DataWeave module called MyModule.dwl that defines a


function
named formatString. The module is located in the project's
src/main/resources/modules folder.
What is the correct way in DataWeave code to import MyModule using a wildcard and
then call the
module's formatString function?

7. A web client sends a request to http://localhost:8081?dept=sales.


What is the correct DataWeave expression to access the value of dept?

8. What path setting is required for an HTTP Listener endpoint to route all
requests to an APIkit
router?

9. In the execution of the Scatter_Gather, the flow1 route completes after 10


seconds and the flow2
route completes after 20 seconds. How many seconds does it take for the
Scatter_Gather to complete?
10. HTTP Listener -> Select DB -> Logger Set Payload
In a selectOderFlow, the DB Select operation returns five rows from a database.
What is logged by the Logger component?

11. A Mule flow has three Set Variable transformers. What global data structure can
be used to
access the variables?

12. createOrder Flow: HTTP POST /orders -> Set Payload Add Item to Order
addItem Flow: Set Payload Create Order object

The Set Payload transformer In the addltem subflow 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 subflow to add a router cable with the price of 100 to the order?

13. A flow needs to combine and return data from two different data sources. It
contains a
Database SELECT operation followed by an HTTP Request operation.

14. A Database On Table Row listener retrieves data from a CUSTOMER table that
contains a
primary key userjd column and an increasing kxjin_date_time column.
Neither column allows duplicate values.
How should the listener be configured so it retrieves each row at most one time?

15. An On Table Row Database listener retrieves data from a table that contains
record_id, an
increasing numerical column. How should the listener be configured so it retrieves
new rows at most one time?

16. A function named newProdCode needs to be defined that accepts two input
parameters, an
integer value for itemID and a string value for productCategory, and returns a new
product code.
What is the correct DataWeave code to define the newProdCode function?

17. A web client submits a request to http://localhost:8081/fliqhts?destination=SFO


and
the Web Service Consumer throws a WSC:BAD_REQUEST error.
What is the next step to fix this error?

18. getNumbers Flow: HTTP: GET / -> Scatter Gather Flow Ref Set Payload to 100 and
Set Payload to 200
Set Payload "100"
Set Payload "200"

Each route in the Scatter-Gather sets the payload to the number shown in the label.
What response is
returned to a web client request to the HTTP Listener?

19. What valid RAML retrieves details on a specific by its orderld as a URL
parameter?

20. routeEvents Flow: HTTP: GET / -> Choice Logger "Route 1" Logger "Route 2"
Logger "Route 3"
All three of the condition for the Choice router are true. What log messages are
written?

21. What execution model is used by For Each and Batch Job scopes?

22. A web client submits a request to http://localhost:8081?flrstName=john. What


is the correct
DataWeave expression to access the firstName parameter?

23. HTTP: POST / -> Request HTTP: POST /service/history -> Set Variable Set data to
payload

What can be added to the flow to persist data across different flow executions?

24. A Mule application contains a global error handler configured to catch any
errors.
Where must the global error handler be specified so that the global error handler
catches all errors
from flows without their own error handlers?

25. The error occurs when a project is run in Anypoint Studio. The project, which
has a dependency that
is not in the MuleSoft Maven repository, was created and successfully run on a
different computer.
What is the next step to fix the error to get the project to run successfully?

26. Batch Process Flow


Scheduler -> Set Payload [1,2,3] -> Batch Step 1 Set Payload "StepOne" ++ payload
-> Batch Step 2 Set Payload "StepTwo" ++ payload ->
On Complete Logger payload

What is the output payload in the On Complete phase?

27. The main flow contains an HTTP Request in the middle of the flow.
The HTTP Listeners and HTTP request use default configurations.

What values are accessible to the Logger at the end of the flow after a web client
submit request to
http://local:801/order?color=red?

28. Why would a Mule application use the ${http.port} property placeholder for its
HTTP Listener
port when it is deployed to CloudHub?

29. HTTP: GET / -> Set Payload [1,2,3,4] -> For Each Set Payload "order" ++ payload
-> Logger payload
What payload is logged at the end of the main flow?

30. HTTP: GET /data -> Select DB /accounts


SQL Query: SELECT * from accounts WHERE city = :city AND state = :state

What expression correctly specifies input parameters to pass the city and state
values to the SQL
query?

31. Scheduler -> Set Payload {'year': '2020'} -> Logger


The Set Payload transformer's value is set to {'year': '2020'}.
What message value should be added to the Logger component to output the message
'The year is
2020', without hardcoding 2020?

32. What is the correct syntax to add an employee ID as a URI parameter in an HTTP
Listener path?

33. Scheduler -> Set Payload "REGION" -> Choice #[not isEmpty(payload) Set Payload
"US" #[payload isString] Set Payload "EU" Default Logger Payload
-> Logger payload

What is logged when the flow completes?

34. A company has an API to manage departments, with each department identified by
a
unique deptld. The API was built with RAML according to MuleSoft best practices.
What is valid RAML to specify a method to update the details for a specific
department?

35. How does APIkit determine the number of flows to generate from a RAML
specification?

36. 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?

37. An HTTP Request operation returns a JSON array of objects. In the Transform
Message component, what is the process to convert the array of objects to an array
of custom Java Account objects?

38. HTTP:GET /test -> Set Payload null -> validation module is not null payload
What happens to this flow when the Validation module's Is not null operator throws
an error?

39. The main flow has an On Error Continue scope. In the Configuration global
element, default error handler is set to globalErrorHandler. A web client makes an
HTTP GET request to the flow's HTTP Listener. The Is number validator then throws
an error with message "Validate - Payload is an Integer". What response message is
returned to the web client?

40. The main flow has an On Error Propagate scope. In the Configuration global
element, default error handler is set to globalErrorHandler. A web client makes an
HTTP GET request to the flow's HTTP Listener. The Is number validator then throws
an error with message "Validate - Payload is an Integer". What response message is
returned to the web client?

41. The private flow has an On Error Propagate scope. In the Configuration global
element, default error handler is set to globalErrorHandler. A web client makes an
HTTP GET request to the flow's HTTP Listener. The Is number validator in the
private flow then throws an error with message "Validate - Payload is an Integer".
What response message is returned to the web client?

42. The main flow has an On Error Continue scope with type set to HTTP:NOT_FOUND.
The Mule application configures globalErrorHandler as its default error handler. A
web client posts a request to the HTTP Listener. The Transform Message component
then throws a MULE:EXPRESSION error trying to convert the payload to
application/xml. What response message is returned to the web client?

43. An event payload contains an unordered array of flight objects, where every
object has a price key and a toAirport key. What is valid DataWeave code to return
flights with price under 500, grouped by toAirport in ascending order, with the
lowest price first?

44. A Mule application has a main flow and a combineNames flow. In the main flow, a
variable named fullName is set to the object {firstName: "Max", lastName: "Mule"}.
What is valid DataWeave code to call the combineNames flow with the input object
stored in the fullName variable?

45. Scheduler -> Set Payload [1,2,3,4] -> Batch Scope/Batch Step with filter
Transform Message Divide by 3 | Batch Aggregate Logger payload -> On Complete

What is the output of the Logger component in the Batch Job?

46. I have a requirement to process the transactions to database without disturbing


the main flow. How you will achieve this?

47. What is the use of $ and $$ in DataWeave?

You might also like