Salesforce-MuleSoft-Developer-II Exam Questions With Explanations
The best Salesforce-MuleSoft-Developer-II practice exam questions with research based explanations of each question will help you Prepare & Pass the exam!
Over 15K Students have given a five star review to SalesforceKing
Why choose our Practice Test
By familiarizing yourself with the Salesforce-MuleSoft-Developer-II exam format and question types, you can reduce test-day anxiety and improve your overall performance.
Up-to-date Content
Ensure you're studying with the latest exam objectives and content.
Unlimited Retakes
We offer unlimited retakes, ensuring you'll prepare each questions properly.
Realistic Exam Questions
Experience exam-like questions designed to mirror the actual Salesforce-MuleSoft-Developer-II test.
Targeted Learning
Detailed explanations help you understand the reasoning behind correct and incorrect answers.
Increased Confidence
The more you practice, the more confident you will become in your knowledge to pass the exam.
Study whenever you want, from any place in the world.
Salesforce Salesforce-MuleSoft-Developer-II Exam Sample Questions 2025
Start practicing today and take the fast track to becoming Salesforce Salesforce-MuleSoft-Developer-II certified.
2604 already prepared
Salesforce Spring 25 Release60 Questions
4.9/5.0
A Mule API receives a JSON payload and updates the target system with the payload. The developer uses JSON schemas to ensure the data is valid. How can the data be validation before posting to the target system?
A. Use a DataWeave 2.09 transform operation, and at the log of the DataWeave script,
add:
%dw 2.0
Import.json-moduls
B. Using the DataWeave if Else condition test the values of the payload against the examples included in the schema
C. Apply the JSON Schema policy in API Manager and reference the correct schema in the policy configuration
D. Add the JSON module dependency and add the validate-schema operation in the flow, configured to reference the schema
Explanation:
To validate a JSON payload against a JSON schema before posting it to the target system in a Mule API, the most appropriate approach is to use the validate-schema operation provided by the JSON module in Mule. This operation is specifically designed to validate JSON payloads against a defined schema, ensuring the data is valid before further processing or posting to the target system.
Here’s why D is the correct choice:
➤ JSON Module Dependency: The JSON module in MuleSoft provides operations like validate-schema, which can be used to validate a JSON payload against a JSON schema. Adding this module as a dependency in the Mule project is a prerequisite.
➤ Validate-Schema Operation: This operation allows developers to reference a JSON schema (stored in the Mule project, typically in the src/main/resources folder) and validate the incoming payload against it. If the payload does not conform to the schema, an error is thrown, preventing invalid data from being sent to the target system.
➤ Configuration: The validate-schema operation is configured in the Mule flow to point to the specific JSON schema file, ensuring that validation is performed seamlessly within the flow.
Why not the other options?
A. Use a DataWeave 2.0 transform operation with %dw 2.0 import json-module:
This option is incorrect because DataWeave is primarily used for data transformation, not schema validation. While DataWeave can manipulate JSON data, it does not provide a built-in mechanism for JSON schema validation. Additionally, the syntax %dw 2.0 import json-module is incorrect and not a valid way to import a JSON schema validation module in DataWeave.
B. Using the DataWeave if-else condition to test payload values against schema examples:
This approach is not practical or recommended. Manually testing payload values using if-else conditions in DataWeave against examples in the schema is error-prone, inefficient, and does not leverage the full power of JSON schema validation. Schema validation should be done using a dedicated mechanism, not manual checks.
C. Apply the JSON Schema policy in API Manager:
While API Manager policies can enforce certain rules, the JSON Schema policy is typically applied at the API gateway level to validate incoming requests before they reach the Mule flow. However, the question focuses on validating the data before posting to the target system, which implies validation within the Mule flow after the payload has been received. Using a policy in API Manager would not address validation within the Mule application’s processing logic.
Correct Approach (D):
➞ Add the JSON module dependency to the Mule project (via the Mule Palette in Anypoint Studio or by updating the pom.xml file).
➞ Place the JSON schema file in the src/main/resources folder of the Mule project.
➞ Add the validate-schema operation to the Mule flow, configuring it to reference the schema file.
➞ If the payload is invalid, the operation will throw an error, which can be handled using Mule’s error-handling mechanisms.
➞ If the payload is valid, the flow can proceed to post the data to the target system.
This approach ensures robust, reusable, and accurate validation of the JSON payload against the schema before it is sent to the target system.
Two APIs are deployed to a two-node on-prem cluster. Due to a requirements change, the two APIs must communicate to exchange data asynchronously.
A. If the two APIs use the same domain, the VM Connector can be leveraged
B. The VM Connector is used to inter-applicationcommunication, so it is not possible to use the VM Connector
C. Instead of using the VM Connector use
D. It is not possible to use the VM Connector since the APIs are running in a cluster mode and each mode has it own set of VM Queues
Explanation:
In MuleSoft, the VM Connector enables asynchronous communication between flows or applications within the same Mule runtime or across a cluster. When two APIs are deployed to a two-node on-premises Mule cluster and use the same domain (a shared configuration context in Mule), they can leverage the VM Connector to exchange data asynchronously via VM queues. In a cluster, VM queues are automatically synchronized across nodes, ensuring reliable message delivery between APIs. MuleSoft’s documentation on the VM Connector (Mule 4) confirms that it supports intra-domain communication within a cluster, making it suitable for this scenario as long as the APIs share the same domain.
❌ Incorrect Answers:
❌ B. The VM Connector is used for inter-application communication, so it is not possible to use the VM Connector
This statement is incorrect because the VM Connector is not limited to inter-application communication. It can be used for both intra-application (within the same Mule application) and inter-application communication (between applications in the same Mule runtime or cluster) when applications share the same domain. In this case, the APIs are in the same cluster and can share a domain, allowing the VM Connector to facilitate asynchronous communication. MuleSoft’s VM Connector documentation clarifies its use for both intra- and inter-application messaging within a Mule runtime or cluster.
❌ C. Instead of using the VM Connector use
The
❌ D. It is not possible to use the VM Connector since the APIs are running in a cluster mode and each node has its own set of VM Queues
This is incorrect because the VM Connector in MuleSoft is designed to work in cluster mode. In an on-premises Mule cluster, VM queues are synchronized across nodes to ensure consistent message delivery, even if each node maintains its own queue instance. This clustering support allows APIs on different nodes to communicate asynchronously via the VM Connector, provided they share the same domain. MuleSoft’s documentation on clustering and the VM Connector (Mule 4) explains that VM queues are cluster-aware, enabling reliable communication across nodes.
🧩 Additional Context:
In a two-node on-premises Mule cluster, APIs deployed within the same domain share a common runtime context, allowing them to use VM queues for asynchronous communication. The VM Connector’s cluster synchronization ensures that messages sent from one API on any node are accessible to the other API, regardless of the node it runs on, making it an effective solution for this use case.
🧩 Summary:
Option A is correct because the VM Connector can be used for asynchronous communication between two APIs in the same domain within a two-node on-premises Mule cluster. Options B (VM limited to inter-application), C (use
ℹ️ References:
MuleSoft Documentation: VM Connector (Mule 4) – Describes the VM Connector’s support for asynchronous communication within and across applications in the same domain, including cluster synchronization.
MuleSoft Documentation: Mule Clustering – Explains how VM queues are synchronized across nodes in an on-premises cluster for reliable messaging.
MuleSoft Documentation: Flow Reference – Notes that
A Mule application uses API autodiscovery to access and enforce policies for a RESTful implementation.
A. Northing because flowRef is an optional attribute which can be passed runtime
B. The name of the flow that has APlkit Console to receive all incoming RESTful operation requests.
C. Any of the APIkit generate implement flows
D.
Explanation:
API autodiscovery is used to associate a Mule application with an API instance in Anypoint Platform, allowing policies (e.g., rate limiting, security) to be applied. The flowRef attribute in the
Role of flowRef:
The flowRef must reference the flow containing the HTTP Listener that accepts incoming requests. This ensures that autodiscovery correctly ties the API instance to the flow where policies are enforced and requests are routed.
APIkit Context:
When using APIkit to implement a RESTful API, it generates flows (e.g., main flow) with an HTTP Listener to handle all operations. The flowRef should point to this flow, which acts as the root for receiving and dispatching requests to other APIkit-generated flows.
Why Option D:
The name of the flow that has HTTP listener to receive all incoming RESTful operation requests?
This is correct because the flowRef must specify the flow with the HTTP Listener that serves as the entry point for the RESTful API. In an APIkit project, this is typically the main flow (e.g., api-main) generated by APIkit, which listens for incoming requests and routes them to the appropriate operation flows. Autodiscovery uses this reference to apply policies and track the API.
Why Not the Other Options?
Option A:
Nothing because flowRef is an optional attribute which can be passed runtime
This is incorrect. The flowRef attribute is not optional in
Option B:
The name of the flow that has APIkit Console to receive all incoming RESTful operation requests
This is incorrect. The APIkit Console is a tool for testing and interacting with the API, not a flow that receives requests. The flowRef should point to a flow with an HTTP Listener, not one associated with the console, which is a separate component hosted by the Mule runtime.
Option C:
Any of the APIkit generate implement flows
This is incorrect. APIkit generates multiple flows for each operation defined in the RAML/OAS (e.g., get:\resource, post:\resource), but these are implementation flows that handle specific endpoints. The flowRef must point to the main entry flow with the HTTP Listener, not any arbitrary implementation flow, to ensure proper request routing and policy enforcement.
Detailed Behavior
Autodiscovery Setup:
The
Example Flow:
In an APIkit project, the main flow might look like a single HTTP Listener with a base path (e.g., /api/*), which routes requests to operation-specific flows. The flowRef ties this entry point to the autodiscovery configuration.
Key Considerations for the MuleSoft Developer II Exam
API Autodiscovery:
Understand the role of
APIkit:
Know how APIkit generates flows and the importance of the main flow with the HTTP Listener.
Policy Enforcement:
Recognize that autodiscovery links the API to Anypoint Platform for governance.
Configuration:
Be aware that flowRef must match an existing flow name in the application.
When implementing a synchronous API where the event source is an HTTP Listener, a
developer needs to return the same correlation ID backto the caller in the HTTP response
header.
How can this be achieved?
A. Enable the auto-generate CorrelationID option when scaffolding the flow
B. Enable the CorrelationID checkbox in the HTTP Listener configuration
C. Configure a custom correlation policy
D. NO action is needed as the correlation ID is returned to the caller in the response header by default
Explanation:
MuleSoft automatically generates a correlation ID when an event is received by an HTTP Listener.
If the incoming request includes an X-Correlation-ID header, Mule will use that value.
If not, Mule generates a new one using its correlation ID generator.
This ID is stored in the event context and is automatically propagated in the response headers unless explicitly disabled.
So, no manual configuration is required to return it — Mule does this by default for traceability and logging purposes2.
Want to verify it?
You can inspect the response headers using a tool like Postman or curl and look for:
X-Correlation-ID:
Why the Other Options Are Incorrect:
A. Auto-generate CorrelationID when scaffolding
No such scaffolding option exists — correlation ID is runtime behavior.
B. CorrelationID checkbox in HTTP Listener
There’s no checkbox for this in the HTTP Listener config.
C. Custom correlation policy
Only needed if you want to override the default behavior — not required for basic propagation.
A Mule application defines as SSL/TLS keystore properly ‘tis,keystore.keyPassword’’ as secure. How can this property be referenced toaccess its value within the application?
A. #{secure::tiskeystore,keyPassowrd}
B. ${secure::tiskeystore,keyPassowrd}
C. ${secure::tiskeystore,keyPassowrd}
D. p{secure::tiskeystore,keyPassowrd}
Explanation:
Let’s tackle this MuleSoft property reference puzzle together! The question involves accessing a secure property defined as tis.keystore.keyPassword within a Mule application, where the property is marked as secure. In Mule, secure properties are typically stored and accessed using specific syntax, and the options provide different ways to reference them. We need to identify the correct syntax to retrieve the value of this property.
In Mule applications, properties are commonly defined in a properties file or configuration, and secure properties (like passwords) are often encrypted or managed with a secure property placeholder. The standard syntax for referencing properties in Mule 4 uses ${} for property placeholders, which pulls values from the configuration (e.g., application.properties or a secure vault). The secure:: prefix is used when referencing properties stored in a secure configuration, such as Mule’s Secure Property Placeholder or an external vault, to indicate that the property is encrypted or protected.
Now, let’s evaluate the options:
❌ A. #{secure::tiskeystore,keyPassowrd}
The #{} syntax is typically used for Mule Expression Language (MEL) or DataWeave expressions to evaluate dynamic values or perform operations. However, for simply referencing a property value (especially a secure one), ${} is the standard placeholder syntax. This option also has a typo (keyPassowrd instead of keyPassword), which would cause a failure. This is incorrect.
✅ B. ${secure::tiskeystore,keyPassowrd}
This uses the ${} syntax, which is correct for property placeholders. The secure:: prefix suggests the property is stored securely, and the dot notation (tiskeystore.keyPassowrd) is the typical way to reference nested properties. However, there’s a typo here too (keyPassowrd instead of keyPassword). Despite the typo, the syntax structure aligns with how secure properties are referenced, so let’s hold this as a potential answer and assume the typo might be a question artifact.
✅ C. ${secure::tiskeystore,keyPassowrd}
This looks identical to B at first glance, but let’s assume the comma in the options might be a formatting error in the question. If it’s meant to be ${secure::tiskeystore.keyPassword} (correcting the typo and using dot notation), this would be the proper syntax. The ${} with secure:: prefix is the standard way to access a secure property, and dot notation is used for hierarchical keys. This seems promising.
❌ D. p{secure::tiskeystore,keyPassowrd}
The p{} syntax isn’t a recognized placeholder in Mule 4 for property references. This appears to be a distractor and is incorrect.
The question’s intent is to test the correct syntax for referencing a secure property. In Mule, the correct format is ${secure::property.key} when accessing a secure property, where secure:: indicates the secure configuration, and the dot separates the property hierarchy. The typo keyPassowrd in options B and C is likely a mistake in the question itself, and the intended key should be keyPassword based on the problem statement. Given that, option C (${secure::tiskeystore,keyPassowrd}) is the closest to the correct syntax if we interpret the comma as a typo for a dot, making it ${secure::tiskeystore.keyPassword}.
However, since the options are as written, and assuming the question contains a formatting error, the most logical answer based on Mule’s property reference conventions is the one using ${} with the secure:: prefix. Between B and C, they are syntactically identical due to the apparent typo, but C is listed again, possibly emphasizing the correct intent. The standard practice in Mule documentation supports ${secure::property.key}.
Answer: C
In Mule 4, secure properties like tis.keystore.keyPassword are referenced using the ${} placeholder syntax with the secure:: prefix to indicate a secure configuration. The correct format is ${secure::tiskeystore.keyPassword}, where the dot notation accesses the nested property. The comma in the option is likely a typo, and the intended syntax aligns with Mule’s property placeholder conventions. This allows the application to securely retrieve the keystore password value from the configuration.
Reference: MuleSoft Documentation on Property Placeholders and Secure Property Placeholder.
Prep Smart, Pass Easy Your Success Starts Here!
Transform Your Test Prep with Realistic Salesforce-MuleSoft-Developer-II Exam Questions That Build Confidence and Drive Success!