Total 234 Questions
Last Updated On : 11-Dec-2025
A web client sends a request to http;//localhost:8081?dept=sales. What is the correct DataWeave expression to access the value of dept?
A. attributes.queryParams.dept
B. attributes.dept
C. message.queryParams.dept
D. vars.dept
Explanation:
In Mule 4, query parameters from an HTTP request are accessed through the message attributes in the queryParams map:
attributes contains all message metadata (headers, query params, URI params)
queryParams is a map within attributes containing all query parameters
dept is the specific query parameter name
So the correct DataWeave expression is: attributes.queryParams.dept
Key Concepts Tested:
Mule 4 message structure and attributes
Accessing HTTP query parameters
Difference between attributes, payload, and vars
Reference:
MuleSoft Documentation: Query parameters are accessed via attributes.queryParams.paramName.
Analysis of Other Options:
B. attributes.dept: Incorrect. Query parameters are not directly under attributes; they're in the queryParams map.
C. message.queryParams.dept: Incorrect. message scope doesn't exist in Mule 4 DataWeave expressions.
D. vars.dept: Incorrect. vars contains flow variables, not automatically populated query parameters. You would need to explicitly set a variable first using Set Variable.
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?
A. addltemf { payload: { price: "100", item: "router", itemType: "cable" } > )
B. lookupf "addltem", { payload: { price: "100", item: "router", itemType: "cable" } } )
C. addltemf { price: "100", item: "router", itemType: "cable" })
D. lookupf "addltem", { price: "100", item: "router", itemType: "cable" } )
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
Refer to the exhibit.

What should be changed to fix the 415 error?
A. set the response Content-Type header to text/plain
B. set the response Content-Type header to application/json
C. Set the request Content-Type header to application/] son
D. set the request Content-Type header to text/plain
Explanation:
Understanding the 415 Error:
415 Unsupported Media Type means the server cannot process the request because it has a Content-Type header that it doesn't support.
The API expects one media type but received another.
Analyzing the RAML Specification:
The POST /accounts endpoint specifies: body: application/json
This means the API only accepts JSON in the request body.
The example shows JSON data being sent.
Current Request Configuration:
The request has Content-Type: text/plain header.
This is incorrect - the API expects application/json.
Solution:
Change the request's Content-Type header from text/plain to application/json.
This matches what the API specification defines.
Key Concepts Tested:
HTTP status code 415 meaning and troubleshooting
Content-Type header importance in REST APIs
Matching request headers to API specification requirements
RAML media type declarations
Reference:
HTTP Specification: 415 Unsupported Media Type indicates the request entity has a media type the server cannot process.
Analysis of Other Options:
A. set the response Content-Type header to text/plain: Incorrect. The issue is with the request Content-Type, not the response. Also, the response should likely be JSON too.
B. set the response Content-Type header to application/json: Incorrect. While the response might be JSON, the 415 error is about the request's Content-Type.
D. set the request Content-Type header to text/plain: Incorrect. This is what's already causing the problem. The API expects JSON, not plain text.
Refer to the exhibit.

This RAML specification includes a resource and method to retrieve accounts by account_type and industry.
What is the correct URI to get all retail finance accounts?
A. /accounts/retail/finance
B. /accounts?account_type=retail&industry=finance
C. /accounts/account_type=retail/industry=finance
D. /accounts?account_type:retail&industry:finance
Explanation:
The exhibit shows the RAML definition for the GET /accounts method:
/accounts:
get:
queryParameters:
account_type:
required: true
enum:
- "retail"
- "commercial"
industry:
required: true
enum:
- "finance"
- "construction"
- "government"
URI Structure: The base resource path is /accounts.
Parameter Type: The parameters (account_type and industry) are defined under the queryParameters section. This means they must be appended to the URI after a question mark (?).
Key-Value Format: Query parameters use the format key=value. Multiple parameters are separated by an ampersand (&).
Target Values: The request needs account_type set to "retail" and industry set to "finance".
Combining these rules, the correct URI is:
/accounts?account_type=retail&industry=finance
❌ Incorrect Answers
A. /accounts/retail/finance: This uses URI path parameters, which would be defined in RAML as /accounts/{accountType}/{industry}. Since the RAML explicitly defines them as queryParameters, this URI is incorrect for this specification.
C. /accounts/account_type=retail/industry=finance: This mixes path parameters and the equals sign, creating an invalid and non-standard URI structure for query parameters.
D. /accounts?account_type:retail&industry:finance: This uses a colon (:) instead of the required equals sign (=) to separate the query parameter key from its value. This is incorrect syntax for HTTP query parameters.
📚 References
RAML Query Parameters: The RAML specification defines queryParameters as key-value pairs appended to the resource path after a question mark (?), separated by ampersands (&) in the HTTP request.
HTTP Query String Format: The standard format for URL query strings is ?key1=value1&key2=value2.
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?
A. 1. http:
2. host = "localhost"
3. port = "8081"
B. 1. http:
2. basepath: "api"
3. host : "localhost"
4. port : "8081"
C. 1. http.host = localhost
2. http.port = 8081
D. 1.{
2. http:
3. basePath: "api",
4. port: "8081",
5. host: " localhost"
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.
Refer to the exhibits.

The main flow contains a Flow Reference to the child flow.
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?
A. payload
B. payload
make query param
C. payload model var
D. payload
make query param model var
Explanation:
Flow Reference Behavior:
When a flow references another flow in Mule 4, it shares the entire Mule event
This includes: payload, variables, attributes (headers, query params, etc.)
What's Available in Main Flow:
Payload: Set to "Cars" by Set Payload "Cars"
Variable: model created by Set Variable model
Query Parameter: make from the HTTP request (?make=...) accessible via attributes.queryParams.make
What Child Flow Receives:
Payload: "Cars" (passed through)
Variable: model (available via vars.model)
Query Parameter: make (available via attributes.queryParams.make)
All other attributes (headers, etc.)
Key Concepts Tested:
Flow Reference event sharing in Mule 4
Scope of variables, payload, and attributes
Difference between flows and subflows (flows preserve their own error handling but share event data)
Reference:
MuleSoft Documentation: Flow Reference passes the current Mule event to the referenced flow.
Analysis of Other Options:
A. payload only: Incorrect. Child flow receives the entire event, including variables and attributes.
B. payload and make query param: Incorrect. Missing the model variable.
C. payload and model var: Incorrect. Missing the make query parameter which is part of the attributes.
Refer to the exhibit.

What expression correctly specifies input parameters to pass the city and state values to the SQL query?
A. Option A
B. Option B
C. Option C
D. Option D
Explanation:
Option A correctly constructs a DataWeave expression that evaluates to a Map (JSON object) with keys that match the named parameters in the SQL query:
#[{city: "San Francisco", state: "CA"}]
Map Structure: The curly braces ({}) denote a Map/Object, which is the required structure for passing named parameters to the Database connector.
Key Matching: The keys city and state exactly match the parameters expected by the query (#:city and #:state).
❌ Incorrect Answers:
B. #[["San Francisco", "CA"]]: This is incorrect. This expression evaluates to an Array (List), not a Map. The Database connector would use the values by position for positional parameters (?), but it cannot correctly map them to the named parameters (#:city, #:state).
C. #[inputParams: { city: "San Francisco", state: "CA" }]: This is incorrect. It wraps the necessary Map inside another field called inputParams. The Database connector expects the root level of the DataWeave expression to be the parameter Map itself, not a Map nested inside an inputParams key.
D. #[inputParams: ["San Francisco", "CA"]]: This is incorrect. It combines an unnecessary outer wrapper (inputParams) with an Array structure ([]), which is not the required Map structure for named parameters.
📚 References:
Database Connector Input Parameters: The MuleSoft documentation for the Database connector confirms that when using named parameters (e.g., #:city), the Input Parameters field must contain a Map (or an Object in DataWeave) where the keys correspond to the parameter names in the SQL query.
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?
A. A configuration properties file
B. Nowhere, the global error handler is automatically used
C. A global element
D. The pom.xml file
Explanation:
To make a named error handler (defined within an
Global Element: The configuration must be done within the
Attribute: You set the defaultExceptionHandler-ref attribute of the
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
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
Mule Project Structure: Documentation confirms the distinct roles of configuration properties files and the pom.xml file.
What valid RAML retrieves details on a specific customer by its customerId as a URI parameter?
A. 1. /customers:
2. /get:
3. /customerId:
B. 1. /customers:
2. /{customerId}:
3. get:
C. 1. /customers:
2. /customerId:
3. get:
D. 1. /customers:
2. get:
3. /{customerId}:
Explanation:
In RAML, to define a resource endpoint that retrieves a specific customer by customerId as a URI parameter:
Resource Hierarchy:
/customers - Resource collection (all customers)
/{customerId} - Nested resource path with parameter for specific customer
get: - HTTP method to retrieve the customer
Correct RAML Structure:
/customers:
/{customerId}:
get:
description: Get customer by ID
Creates endpoint: GET /customers/{customerId}
{customerId} is a path parameter (in curly braces)
Usage Example:
Request: GET /customers/12345
customerId = 12345
Key Concepts Tested:
RAML resource nesting and path parameters
RESTful URI design for resource access
Path parameter syntax ({parameterName})
Reference:
RAML Specification: Path parameters are defined using curly braces in resource paths.
Analysis of Other Options:
A: Incorrect. Places HTTP method (get) at wrong level, and uses /customerId: (literal string) instead of /{customerId}: (parameter).
C: Incorrect. Uses /customerId: (literal path segment) instead of /{customerId}: (parameterized path segment).
D: Incorrect. Places path parameter /{customerId} under the get: method, which is invalid RAML. Path segments must be defined before HTTP methods.
What statement is a part of MuleSoft's description of an application network?
A. Creates and manages high availability and fault tolerant services and infrastructure
B. Creates reusable APIs and assets designed to be consumed by other business units
C. Creates and manages a collection of JMS messaging services and infrastructure
D. Leverages Central IT to deliver complete point-to-point solutions with master data management
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.
| Page 6 out of 24 Pages |
| Salesforce-MuleSoft-Developer Practice Test Home | Previous |
Our new timed Salesforce-MuleSoft-Developer practice test mirrors the exact format, number of questions, and time limit of the official exam.
The #1 challenge isn't just knowing the material; it's managing the clock. Our new simulation builds your speed and stamina.
You've studied the concepts. You've learned the material. But are you truly prepared for the pressure of the real Salesforce Agentforce Specialist exam?
We've launched a brand-new, timed Salesforce-MuleSoft-Developer practice exam that perfectly mirrors the official exam:
✅ Same Number of Questions
✅ Same Time Limit
✅ Same Exam Feel
✅ Unique Exam Every Time
This isn't just another Salesforce-MuleSoft-Developer practice questions bank. It's your ultimate preparation engine.
Enroll now and gain the unbeatable advantage of: