Skip to main content

Last updated: May 2026

Practice Exam

Mule-Dev-201MuleSoft Certified Developer - Level 1

Test your knowledge with official exam-style questions

Questions26Passing70Exam time120 min

Questions and options are shuffled each attempt

Salesforce Certified MuleSoft DeveloperPractice Exam Set 1: All Questions & Explanations

Full question text, answer options, and explanations for this practice set — a spoiler-free alternative is the interactive quiz above for scored, shuffled practice.

  1. 1. Where in the Anypoint Platform should a developer publish a completed RAML API specification so that other teams can discover and consume it?

    • A. API Manager
    • B. Anypoint Exchange(correct)
    • C. Runtime Manager
    • D. Anypoint Monitoring

    Explanation: Anypoint Exchange is the internal API marketplace where teams publish RAML/OAS specifications, connectors, templates, and examples. Other teams discover and consume these assets from Exchange. API Manager manages runtime policies; Runtime Manager manages deployed applications.

  2. 2. A developer wants to generate a Mule application skeleton directly from a published RAML specification in Anypoint Studio. Which feature enables this?

    • A. DataWeave Transform Message component
    • B. APIkit Router(correct)
    • C. Scatter-Gather component
    • D. MUnit test scaffolding

    Explanation: APIkit reads a RAML or OAS specification and auto-generates the Mule flow scaffolding (router, error flows, and one flow per resource+method). The APIkit Router dispatches incoming HTTP requests to the appropriate flow based on method and resource path defined in the spec.

  3. 3. Which of the following are valid RAML 1.0 features for reducing duplication across an API specification? (Select TWO)

    • A. Traits (reusable sets of method properties applied to multiple resources)(correct)
    • B. Resource Types (reusable resource patterns with placeholder parameters)(correct)
    • C. Scatter-Gather definitions
    • D. DataWeave inline transformation blocks

    Explanation: RAML 1.0 provides Traits (reusable method fragments — e.g., 'pageable', 'secured') and Resource Types (reusable resource templates — e.g., 'collection', 'member') to eliminate repetition. These are applied to resources/methods with the 'is:' and 'type:' keys. Scatter-Gather and DataWeave are Mule runtime concepts, not RAML features.

  4. 4. In RAML 1.0, how is a custom data type defined and reused across multiple resource definitions?

    • A. Define it under the 'schemas:' section using XML Schema Definition (XSD)
    • B. Define it under the 'types:' section as a named RAML type and reference it by name in body definitions(correct)
    • C. Inline the JSON schema in every resource body definition separately
    • D. Use a DataWeave type definition file (.dwl) and import it into RAML

    Explanation: RAML 1.0 uses the 'types:' section to define named data types (supporting inheritance, required/optional fields, enum, pattern, format). These types are referenced by name anywhere a body or query parameter type is needed, avoiding duplication.

  5. 5. A developer needs to design an API that accepts either application/json or application/xml request bodies for the same POST endpoint. How is this expressed in RAML 1.0?

    • A. Define two separate POST methods on the same resource, one for each media type
    • B. Use an anyOf union type that references both the JSON and XML schemas
    • C. Define multiple media type keys under the body section of the POST method (application/json and application/xml each with their own schema)(correct)
    • D. Set the Content-Type header as an enum with both values; the body uses a single generic schema

    Explanation: RAML 1.0 allows multiple media type body definitions within a single method by listing each media type as a key under 'body:'. Each entry specifies its own schema/type. The APIkit router and Mule HTTP connector will match incoming requests to the appropriate schema based on Content-Type.

  6. 6. What are the three top-level components of a Mule 4 message?

    • A. Header, Body, Footer
    • B. Payload, Attributes, Variables(correct)
    • C. Inbound, Outbound, Session Properties
    • D. Source, Processor, Target

    Explanation: A Mule 4 message consists of: Payload (the message body data), Attributes (metadata about the message — e.g., HTTP headers, query params, status code), and Variables (flow-scoped values stored during processing). Inbound/outbound/session properties were Mule 3 constructs removed in Mule 4.

  7. 7. What is the difference between a Flow and a Sub-Flow in Mule 4?

    • A. A Sub-Flow can have a Source (trigger); a Flow cannot
    • B. A Flow has a Source and its own error handling scope; a Sub-Flow has neither and inherits the calling flow's error handler(correct)
    • C. A Flow processes messages synchronously; a Sub-Flow processes them asynchronously
    • D. There is no functional difference — they are syntactic aliases

    Explanation: In Mule 4, a Flow has a Source (trigger) section and its own Error Handler. A Sub-Flow has neither: it has no source and no independent error handler — errors propagate up to the calling flow's error handler. Sub-flows are used for reusable logic snippets called via Flow Reference.

  8. 8. A developer needs to route a Mule message to different processors based on the value of a query parameter 'type'. Which router should be used?

    • A. Scatter-Gather
    • B. First Successful
    • C. Choice Router(correct)
    • D. Round Robin

    Explanation: The Choice Router evaluates a series of DataWeave conditions in order and routes the message to the first matching route. It is the Mule 4 equivalent of an if-elseif-else construct, ideal for routing based on payload content, attributes, or variables.

  9. 9. A developer needs to call three independent external REST APIs and aggregate all three responses before returning to the caller. Which component is most appropriate?

    • A. For Each scope
    • B. Scatter-Gather(correct)
    • C. Choice Router
    • D. Async scope

    Explanation: Scatter-Gather executes all its child routes concurrently (in parallel) and waits for all to complete before merging results into a single payload array. It is the correct choice when multiple independent calls must be made and all responses combined. For Each is for sequential iteration over a collection.

  10. 10. A developer uses a For Each scope to process a list of 1000 records, calling an external API for each. What is the default behaviour of For Each regarding the original payload?

    • A. For Each permanently replaces the payload with the last processed element
    • B. For Each restores the original payload after all iterations complete(correct)
    • C. For Each converts the payload to an array of processing results
    • D. For Each suspends message processing and uses a separate thread per element

    Explanation: Mule 4's For Each scope processes each element of a collection and restores the original payload after all iterations complete. This means the payload after For Each is the same collection as before — individual iteration results are not automatically collected unless the developer stores them in a variable.

  11. 11. Which of the following Mule 4 connector operations perform write/mutate actions on a relational database? (Select TWO)

    • A. Database Select
    • B. Database Insert(correct)
    • C. Database Bulk Insert(correct)
    • D. Database Query Single

    Explanation: Database Insert writes a single record; Database Bulk Insert writes multiple records in a single database operation (more efficient for large datasets). Database Select and Query Single are read operations — they do not modify data.

  12. 12. A developer configures an HTTP Request connector to call an external API that returns HTTP 404 when a resource is not found. By default, how does the Mule 4 HTTP connector treat a 404 response?

    • A. The connector throws a Mule error automatically, triggering the error handler
    • B. The connector sets the payload to null and continues processing normally
    • C. The connector returns the 404 response as a normal message (payload + status attribute); no error is thrown unless the developer configures response validator settings(correct)
    • D. The connector retries the request automatically three times before throwing an error

    Explanation: By default, the Mule 4 HTTP Request connector does NOT treat HTTP 4xx/5xx as Mule errors — it returns the response (including the 404 status code in attributes.statusCode) as a normal message. To have the connector raise a Mule error on specific HTTP status codes, the developer must configure the Response Validator (either the default validator or a custom one).

  13. 13. A developer stores a value using 'Set Variable' with the name 'customerId'. Which DataWeave expression correctly reads this variable inside the same flow?

    • A. payload.customerId
    • B. attributes.customerId
    • C. vars.customerId(correct)
    • D. message.customerId

    Explanation: In Mule 4 DataWeave expressions, flow variables are accessed via the 'vars' selector: vars.customerId or vars['customerId']. The payload selector accesses the message body; attributes accesses metadata (HTTP headers, query params). There is no 'message.x' shorthand for variables.

  14. 14. What does the following DataWeave expression produce given the input payload [{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]? payload filter (item) -> item.age > 28

    • A. [{"name": "Alice", "age": 30}](correct)
    • B. [{"name": "Bob", "age": 25}]
    • C. 30
    • D. true

    Explanation: The DataWeave 'filter' function returns a new array containing only elements for which the lambda returns true. Since only Alice (age 30) satisfies age > 28, the result is [{"name": "Alice", "age": 30}].

  15. 15. Which DataWeave function transforms each element of an array and returns a new array of the same length?

    • A. filter
    • B. reduce
    • C. map(correct)
    • D. groupBy

    Explanation: The 'map' function transforms each element of an array using a lambda and returns a new array of the same length. 'filter' reduces the array by removing non-matching elements. 'reduce' collapses the array to a single value. 'groupBy' returns an object of arrays keyed by the grouping criterion.

  16. 16. A developer needs to transform a flat array of orders into an object where each key is a customer ID and the value is an array of that customer's orders. Which DataWeave function is most appropriate?

    • A. map
    • B. filter
    • C. groupBy(correct)
    • D. flatten

    Explanation: DataWeave's 'groupBy' function partitions an array into an object whose keys are distinct values of the grouping key and whose values are arrays of matching elements. Example: payload groupBy (order) -> order.customerId produces {"CUST-1": [...], "CUST-2": [...]}.

  17. 17. What does the DataWeave 'pluck' function do?

    • A. Removes a specific key from an object
    • B. Transforms an object into an array by iterating over key-value pairs(correct)
    • C. Flattens a nested array by one level
    • D. Merges two objects, with the second overwriting conflicting keys

    Explanation: 'pluck' iterates over the key-value pairs of an object and returns an array. The lambda receives (value, key, index). It is the object counterpart of 'map' for arrays, useful for converting an object's entries into an array for further processing.

  18. 18. Which DataWeave expressions correctly access the value 'hello' from the payload {"data": {"message": "hello"}}? (Select TWO)

    • A. payload.data.message(correct)
    • B. payload['data']['message'](correct)
    • C. payload.data[0]
    • D. payload..message[0]

    Explanation: Both dot notation (payload.data.message) and bracket notation (payload['data']['message']) correctly navigate the object hierarchy. payload.data[0] would attempt array indexing on the nested object (returning null/error). The descendant selector (payload..message[0]) also works but is less idiomatic — A and B are the standard approaches.

  19. 19. A developer uses the DataWeave 'using' keyword. What is its purpose?

    • A. To import an external DataWeave module library
    • B. To define local variables within a DataWeave expression block for reuse without repeating the computation(correct)
    • C. To declare the output MIME type of the transformation
    • D. To call a Java class method from within DataWeave

    Explanation: The 'using' keyword defines local variables scoped to a DataWeave expression block. Example: using (fullName = firstName ++ ' ' ++ lastName) { name: fullName, greeting: 'Hello, ' ++ fullName }. This avoids computing the same expression multiple times and improves readability.

  20. 20. What is the difference between 'On Error Continue' and 'On Error Propagate' in a Mule 4 error handler?

    • A. On Error Continue retries the failed processor; On Error Propagate skips it
    • B. On Error Continue executes its processors and returns a successful response to the caller; On Error Propagate executes its processors but re-throws the error to the parent scope(correct)
    • C. On Error Continue is for network errors only; On Error Propagate handles all error types
    • D. There is no difference — both halt flow execution and return an error response

    Explanation: On Error Continue handles the error, executes its child processors, and then allows the flow to complete successfully (the error is considered resolved). On Error Propagate handles the error but then re-throws it upward, so the caller sees a failure. Use Continue for fault-tolerant recovery; use Propagate to signal failure to the calling flow.

  21. 21. A developer wants to handle a specific error type (HTTP:NOT_FOUND) differently from all other errors in a flow. How should the error handler be configured?

    • A. Add a single 'On Error Continue' scope; use a Choice Router inside it to check the error type
    • B. Add two error handler scopes: one 'On Error Continue' with type='HTTP:NOT_FOUND' and one 'On Error Propagate' with type='ANY' for all other errors(correct)
    • C. Set a global error handler that catches all errors regardless of type
    • D. Use a Try scope around each HTTP Request with a separate error handler per request

    Explanation: Mule 4 error handlers evaluate their child scopes in order, matching the first scope whose 'type' attribute matches the error. Setting type='HTTP:NOT_FOUND' on the first scope handles that specific case; type='ANY' on the second catches everything else. Mule error type matching supports wildcards (e.g., 'HTTP:*' matches all HTTP errors).

  22. 22. What is the purpose of the 'Try' scope in Mule 4?

    • A. To attempt a RAML specification validation before executing a flow
    • B. To wrap a subset of processors with their own error handler, enabling localised error handling within a flow(correct)
    • C. To retry a failed HTTP request automatically with exponential backoff
    • D. To test DataWeave expressions in the Anypoint Studio console

    Explanation: The Try scope encloses a group of processors with its own embedded error handler. When an error occurs inside the Try scope, only that scope's error handler fires — not the flow's error handler. This enables targeted, localised error recovery without affecting the rest of the flow's error handling.

  23. 23. Which of the following are valid Mule 4 error type namespaces for categorising errors? (Select TWO)

    • A. HTTP (e.g., HTTP:UNAUTHORIZED, HTTP:NOT_FOUND)(correct)
    • B. MULE (e.g., MULE:EXPRESSION, MULE:CONNECTIVITY)(correct)
    • C. JAVA (e.g., JAVA:NullPointerException)
    • D. FLOW (e.g., FLOW:TIMEOUT)

    Explanation: Mule 4 uses a namespace:ERROR_ID pattern. The HTTP connector raises errors in the HTTP namespace (HTTP:NOT_FOUND, HTTP:UNAUTHORIZED, HTTP:CONNECTIVITY). Core Mule errors use the MULE namespace (MULE:EXPRESSION for DataWeave errors, MULE:CONNECTIVITY for generic connectivity issues). JAVA and FLOW are not standard Mule error namespaces.

  24. 24. A developer has a packaged Mule application (JAR). Which Anypoint Platform component is used to deploy and monitor this application in CloudHub?

    • A. Anypoint Exchange
    • B. API Manager
    • C. Runtime Manager(correct)
    • D. Anypoint Design Center

    Explanation: Runtime Manager is the Anypoint Platform console for deploying, monitoring, and managing Mule applications across CloudHub (Anypoint's iPaaS), Runtime Fabric, and hybrid on-premise runtimes. API Manager manages API policies; Exchange manages assets; Design Center is for API design.

  25. 25. A developer deploys a Mule 4 application to CloudHub. Where should database credentials and API keys be stored to keep them secure and externalised from the application code?

    • A. Hardcoded in the Mule XML configuration file
    • B. Stored in Anypoint Exchange as a shared resource
    • C. Stored as Secure Properties using a key stored in the Runtime Manager application properties (CloudHub Properties tab)(correct)
    • D. Placed in the application JAR as a properties file inside the src/main/resources folder

    Explanation: Secure Properties should be encrypted using the Secure Properties Tool and the encryption key stored as a CloudHub property (not in the codebase). The Mule application references a secure:properties file; the encryption key is provided at runtime via the CloudHub Properties tab. This keeps secrets out of source code and the JAR.

  26. 26. A Mule application on CloudHub needs to scale horizontally to handle increased load. Which CloudHub setting controls the number of application worker instances?

    • A. Persistent Queues setting in the Runtime Manager application settings
    • B. Worker size (vCore) setting
    • C. Number of Workers setting in the CloudHub deployment configuration(correct)
    • D. API Manager SLA tier configuration

    Explanation: CloudHub supports horizontal scaling by running multiple identical worker instances of the same application. The 'Number of Workers' setting in Runtime Manager controls how many instances run. Worker size (vCore) controls vertical scaling (CPU/memory per worker). To ensure stateless behaviour, Persistent Queues should also be enabled so VM queues are shared across workers.