Salesforce certification · Exam Salesforce-MuleSoft-Developer

Salesforce-MuleSoft-Developer Mock Exam Page 3

Salesforce MuleSoft Developer - Mule-Dev-201

Free Salesforce-MuleSoft-Developer questions on MuleSoft Fundamentals, each with the answer and an explanation.

20 questions · 33 minutes · free, no sign-up

MuleSoft Fundamentals questions

21–30 of 39 free
Question 21 Choose 1
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?
Show answerHide answer

Correct answer: D Set the watermark column to the record id column

Explanation

Explanation:

The On Table Row listener in Mule uses a watermark column to ensure that only new rows (rows with a value greater than the last processed watermark) are retrieved each time it polls the database.

Since the table has record_id as an increasing numeric column, setting:
watermarkColumn = record_id
ensures:

Only rows with record_id greater than the previously processed one are fetched.
Each row is retrieved once and only once.
This is the exact mechanism MuleSoft provides for avoiding duplicate row processing.

❌ Why the other options are wrong

A. Set the target to store the last retrieved record_id value
The target just stores output into a variable; it does not control polling behavior.

B. Set the ObjectStore to store the last retrieved record_id value
While ObjectStore is used behind the scenes to track watermarks, you should not configure it manually. Mule manages this internally when watermarkColumn is set.

C. Set the target to the record_id column
Again, the target attribute does not determine how rows are selected. It simply stores the output payload somewhere else.

βœ” Final Answer: D. Set the watermark column to the record id column
Question 22 Choose 1
A web client submits a request to http://localhost:8081/books/0471767840. The value "0471767840" is captured by a Set Variable transformer to a variable named booklSBN.
What is the DataWeave expression to access booklSBN later in the flow?
Show answerHide answer

Correct answer: D vars. booklSBN

Explanation

Explanation:

This is essentially the same concept as Question 1: accessing a value that has been explicitly stored in the Mule Event's variable scope.

Variable Storage: The Set Variable component stores data in the Variables scope.
Accessing Variables: In Mule 4 DataWeave, the keyword vars is used to access this scope.
Access Expression: To retrieve the value of the variable named booklSBN, the expression is vars.booklSBN.

❌ Incorrect Answers

A. booklSBN: This is an invalid DataWeave expression for accessing a variable; you must specify the scope (e.g., vars.). If not scoped, DataWeave attempts to resolve it as a payload field or global function.

B. attributes.booklSBN: The attributes scope holds data from the inbound request (like the URI parameter that initially held the ISBN), but once it is stored in a flow variable, it should be accessed via the vars scope.

C. flowVars.booklSBN: This is the deprecated Mule 3 syntax for accessing flow variables.

πŸ“š References
Mule 4 Event Structure: Mule 4 uses the vars keyword to access flow variables.
Question 23 Choose 1
Refer to the exhibit.



The main flow is configured with their error handlers. A web client submit a request to the HTTP Listener and the HTTP Request throws an HTTP:NOT_FOUND error.
What response message is returned?’’
What response message is returned?
Show answerHide answer

Correct answer: A APP: API RESOURCE NOT FOUND

Explanation

Explanation:

Let's trace through the error handling:

HTTP Request throws HTTP:NOT_FOUND error.

Error Mapping in the HTTP Request:
Has an error mapping: HTTP:NOT_FOUND β†’ APP:API_RESOURCE_NOT_FOUND
This means the HTTP:NOT_FOUND error is re-mapped to APP:API_RESOURCE_NOT_FOUND before reaching the flow's error handler.

Flow Error Handler:
Has an On Error Propagate for HTTP:NOT_FOUND β†’ but this won't trigger because error was already re-mapped
Has an On Error Propagate for APP:API_RESOURCE_NOT_FOUND β†’ This WILL trigger
This error handler sets payload to "APP:API_RESOURCE_NOT_FOUND"

Key Point:
Error mappings in processors (like HTTP Request) happen before the flow's error handlers
The re-mapped error (APP:API_RESOURCE_NOT_FOUND) propagates up
The matching error handler for APP:API_RESOURCE_NOT_FOUND executes and sets the payload

Why not other options:

B. HTTP:NOT_FOUND: Would be if error mapping didn't exist or didn't work

C. other error: Would be if error didn't match any specific handlers and went to the On Error Continue with when: #[true], but APP:API_RESOURCE_NOT_FOUND has a specific handler

D. success: Clearly not, since an error occurred

Key Concepts Tested:
Error mapping in processors vs. flow error handlers
Order of error processing (mapping first, then error handlers)
Error propagation behavior

Reference:
MuleSoft Documentation: Error mappings in processors transform error types before they reach flow error handlers.
Question 24 Choose 1
Refer to the exhibits.



The my-app xml file contains an Error Handier scope named "global-error-handler"
The Error Handler scope needs to be set to be the default error handler for every flow in the Mule application
Where and how should the value "global-error-handler" be added in the Mule project so that the Error Handler scope is the default error handler of the Mule application?
Show answerHide answer

Correct answer: D In the my-app.xml file, as an attribute of a configuration element

Explanation

Explanation of Correct Answer

To set a named error handler (like global-error-handler) as the default exception strategy for all flows within a Mule application, you must configure the configuration element.

Configuration Element: The configuration element is a global element in a Mule configuration XML file (like my-app.xml).

Default Error Handler Attribute: You set the defaultExceptionHandler-ref attribute of the configuration element to the name of the desired error handler.

By placing this configuration in my-app.xml (the file where the flows and error handler are defined), any flow that does not have its own local defined will automatically use the global-error-handler when an error is thrown.

❌ Incorrect Answers

A. In the mule-artifact json file, as the value of a key-value pair: The mule-artifact.json file is used for configuration related to deployment and classloading (e.g., domain artifact configuration, required Mule versions). It is not used to define the application's default error handler.

B. In the Validation folder as the value of a global element in the error-handling yaml file: Mule configuration is typically defined in XML files, not YAML files specifically for error handling. Furthermore, the location "Validation folder" is not a standard configuration location for this purpose.

C. In the pom.xml file, as the value of a global element: The pom.xml file is for Maven build management (dependencies, packaging, plugins). It is not used for defining Mule application runtime configuration like the default error handler.

πŸ“š References
Global Default Exception Strategy: The official MuleSoft documentation explains that the defaultExceptionHandler-ref attribute on the element is used to set a global default error handler for an entire Mule application.

Mule Project Structure: Documentation confirms the distinct roles of mule-artifact.json (deployment metadata) and pom.xml (Maven build configuration).
Question 25 Choose 1
Refer to the exhibits.



The expression for the Choice router needs to be written.
What is a valid expression to route Mule events to the non-default flow?
Show answerHide answer

Correct answer: A #['MuleSoft' == paytoad.company]

Explanation

Explanation:

The Choice router's when expression must be a valid DataWeave expression that evaluates to a Boolean (true or false).

Accessing the Payload: The company name is stored as the key company within the current payload. To access it, the expression must use payload.company.

Comparison: The goal is to check if this value is equal to the string literal "MuleSoft". DataWeave uses the double equals sign (==) for equality comparison.

Full Expression: The entire valid DataWeave expression is:
#[’MuleSoft’==payload.company]

This expression correctly compares the string "MuleSoft" with the value of the company field in the current payload, which evaluates to true when the payload is {"company": "MuleSoft"}. (Note: Single quotes 'MuleSoft' and double quotes "MuleSoft" are typically interchangeable for string literals in DataWeave).

❌ Incorrect Answers

B. #[ company = "MuleSoft" ]: This uses the single equals sign (=), which is the DataWeave assignment operator (used to define variables or map fields), not the equality comparison operator. This expression would result in an error or unexpected behavior, as it does not evaluate to a boolean.

C. #[ if( company = "MuleSoft") ]: This incorrectly uses the DataWeave if-else construct when only a single boolean condition is required. Additionally, it uses the assignment operator (=) instead of the comparison operator (==), and it fails to specify the payload scope (payload.company).

D. #[ if( 'MuleSoff == payload.company) ]: This is incorrect. While the comparison logic (== payload.company) is correct, the if keyword is unnecessary and invalid for the when condition of a Choice router, which expects a direct boolean result. Furthermore, it contains a typographical error ('MuleSoff instead of 'MuleSoft').

πŸ“š References
Choice Router: The MuleSoft documentation for the Choice Router requires that the when condition be a DataWeave expression that evaluates to a boolean value.

DataWeave Comparison Operators: DataWeave uses the double equals sign (==) for equality comparison, and the single equals sign (=) for assignment.
Question 26 Choose 1
Refer to the exhibits.



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?
Show answerHide answer

Correct answer: B lookupf "addltem", { payload: { price: "100", item: "router", itemType: "cable" } } )

Explanation

Explanation:

Why it's correct:

lookup() is the only valid DataWeave function to invoke a subflow from within a DataWeave script.

"addItem" is the name of the subflow being called.

The second argument is the payload object passed to the subflow, matching the expected structure (item, itemType, price).
This syntax ensures the subflow executes and returns the transformed order object.

❌ Why the Other Options Are Incorrect:

A. addItem({ payload: { price: "100", item: "router", itemType: "cable" } })
Why it's wrong:
addItem() is not a valid DataWeave function.
DataWeave does not support direct invocation of subflows using function-style syntax like addItem(...).
Only lookup() can call a flow or subflow.

B. lookup("addItem", { payload: { price: "100", item: "router", itemType: "cable" } })
Why it's wrong:
This syntax adds an unnecessary payload wrapper around the actual data.
The addItem subflow expects the fields (item, itemType, price) directly in the payload β€” not nested inside another payload key.
This would result in payload.payload.item, which breaks the transformation logic.

C. addItem({ price: "100", item: "router", itemType: "cable" })
Why it's wrong:
Like option A, this uses invalid function-style syntax.
addItem is a subflow, not a callable function in DataWeave.
Only lookup() can invoke subflows.

πŸ“š Reference:
MuleSoft Docs: DataWeave lookup function
Trailhead: MuleSoft Flow Design
Question 27 Choose 1
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?
Show answerHide answer

Correct answer: B 1. http:
2. basepath: "api"
3. host : "localhost"
4. port : "8081"

Explanation

Explanation

The HTTP Listener configuration uses property placeholders:
${http.host}
${http.port}

Because the placeholder file is config.yaml, it must follow YAML syntax, not .properties syntax.

A valid YAML structure for these keys must look like:
http:
host: "localhost"
port: "8081"

Option B is the only choice that uses correct YAML formatting.
Including basepath does not cause any issue β€” extra keys are allowed in a YAML config file.

Why the others are invalid

A uses = which is not valid YAML syntax.
C uses .properties format, not YAML.
D is written as JSON, not YAML.
Question 28 Choose 1
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?
Show answerHide answer

Correct answer: C A global element

Explanation

Explanation:

To make a named error handler (defined within an tag) the default exception strategy for all flows in a Mule application that do not have their own local error handler, you must use the Global Configuration Element:
Global Element: The configuration must be done within the tag, which is a global element typically found near the top of a Mule configuration XML file.
Attribute: You set the defaultExceptionHandler-ref attribute of the element to the name of the error handler you want to use as the default (e.g., defaultExceptionHandler-ref="my-global-error-handler").
This mechanism ensures that any flow or subflow that fails and lacks a local error handler will propagate its error to this globally defined handler.

❌ Incorrect Answers:

A. A configuration properties file: Configuration properties files (.yaml, .properties) are used to store runtime variables (host, port, credentials) and are read by the Mule runtime, but they are not used to define or reference the default error handler structure.
B. Nowhere, the global error handler is automatically used: This is incorrect. While errors propagate to the application's root, a defined, named handler must be explicitly set as the default using the defaultExceptionHandler-ref attribute on the element to be automatically used by unhandled flows.
D. The pom.xml file: The pom.xml file is strictly used for Maven build management, dependency management, and packaging the application. It contains no runtime configuration for Mule error handling.

πŸ“š References:
Global Default Exception Strategy: The official MuleSoft documentation states that the defaultExceptionHandler-ref attribute on the element (a global element) is used to set a global default error handler for an entire Mule application.
Mule Project Structure: Documentation confirms the distinct roles of configuration properties files and the pom.xml file.
Question 29 Choose 1
What statement is a part of MuleSoft's description of an application network?
Show answerHide answer

Correct answer: B Creates reusable APIs and assets designed to be consumed by other business units

Explanation

Explanation:

MuleSoft's core philosophy centers on the concept of the Application Network. This network is fundamentally a way of connecting applications, data, and devices through reusable, discoverable APIs.

The goal of this architectural pattern is to shift away from brittle, point-to-point integrations and instead create a web of interchangeable services (APIs and assets) that can be easily consumed by any part of the organization. This reusability dramatically accelerates project delivery and fosters agility across the business.

Why the other options are incorrect:

A. Creates and manages high availability and fault tolerant services and infrastructure: While Mule applications are typically deployed with high availability and fault tolerance, this is a feature of the deployment environment (like CloudHub or Runtime Fabric), not the primary description of the application network architecture itself.

C. Creates and manages a collection of JMS messaging services and infrastructure: JMS messaging is one type of communication that can occur within an application network, but the description is too narrow. The network encompasses all protocols (HTTP, databases, SaaS, etc.) interconnected via APIs.

D. Leverages Central IT to deliver complete point-to-point solutions with master data management: MuleSoft's approach moves away from "point-to-point solutions," which are precisely what the application network is designed to replace. It favors reusable layers of APIs over custom one-off integrations.

πŸ“š References:
Application Network Definition: The application network is described as a system where applications are connected via APIs that are exposed in a standardized, discoverable, and reusable manner, often categorized into layers (System, Process, Experience).

API-Led Connectivity: MuleSoft uses API-led connectivity to create the application network by creating reusable assets designed for consumption by other parts of the business.
Question 30 Choose 1
Refer to the exhibits. The Mule application does NOT define any global error handlers.
A web client sends a POST request to the Mule application with this input payload. The File Write operation throws a FILE: CONNECTIVITY error.
What response message is returned to the web client?

Show answerHide answer

Correct answer: D "ORDER: NOT CREATED"

Explanation

Explanation:

Error Triggered: The File Write operation throws a FILE:CONNECTIVITY error.

Immediate Error Handler: The Write component is configured with an Error Mapping strategy.
Error Mapping Execution: The Error Mapping within the Write component specifically maps the incoming FILE:CONNECTIVITY error to a new error type: ORDER:NOT_CREATED.
Error Propagation/Handling: Because the Write operation successfully mapped the error, the execution context (the error type) changes from FILE:CONNECTIVITY to ORDER:NOT_CREATED.
Scope/Flow Error Handler Activation: The execution then moves to the acceptOrder flow's Error handling section. It searches for a handler matching the new error type, ORDER:NOT_CREATED.
Handler Selected: The second On Error Continue block is triggered because its type is set to ORDER:NOT_CREATED.
Response Generation: The action inside this On Error Continue block is a Set Payload component, which sets the payload to "ORDER:NOT_CREATED".
Continue Behavior: Since this is an On Error Continue scope, it completes the flow execution successfully (as far as the web client is concerned). The final payload, "ORDER:NOT_CREATED", is returned to the web client.

❌ Incorrect Answers and Reasoning
A. "FILE: CONNECTIVITY": This would be the result if the second On Error Continue was not present, and the first one (for FILE:CONNECTIVITY) was executed, AND that first handler did not use On Error Continue but instead returned the payload. However, the FILE:CONNECTIVITY error is mapped away to ORDER:NOT_CREATED by the Write component before it reaches the top-level error handlers.

B. "OTHER ERROR": This is set in the On Error Propagate block. This block has the generic when: #[#true] condition, meaning it acts as the default catch-all. It would only be reached if the error type was not FILE:CONNECTIVITY or ORDER:NOT_CREATED. Since the error is explicitly handled by the second On Error Continue, the On Error Propagate is never executed.

C. "File written": This payload is set by a component after the Write operation in the main flow. Because the Write operation throws an error, the flow execution is immediately interrupted and moves to the Error Handling block, meaning the subsequent Set Payload "File written" component is skipped entirely.

πŸ“š References
This scenario is based on three core concepts in Mule 4:

Component-Level Error Mapping:
MuleSoft Documentation on Handling Component-Level Errors [Search: MuleSoft documentation error mapping]

Flow-Level Error Handlers (On Error Continue vs. On Error Propagate):
MuleSoft Documentation on Error Handling in Mule 4 [Search: MuleSoft documentation On Error Continue vs On Error Propagate]

Error Scope Behavior (On Error Continue):
When an On Error Continue handler successfully processes an error, it returns a success message to the calling flow or client (the status code defaults to 200 OK), and its payload becomes the response body.
Full mock exam

Sit the Salesforce-MuleSoft-Developer exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real Salesforce-MuleSoft-Developer exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full Salesforce-MuleSoft-Developer mock exam
  • 65questions per mock
  • 105 mintime limit
  • 234questions in the bank
  • Newmock on every attempt