Rapid Review & Cheat Sheets · Developer / Senior

Real Interview Q&A Collection (Global Companies) — Interview Questions & Scenarios (2026)

Real interview questions asked by Fortune 500 enterprises, banks, and major SI consultancies.

🏢 Real Interview Q&A Collection (Global Companies)

Real interview questions asked by Fortune 500 enterprises, banks, and major SI consultancies.

Q18 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

An exception arose at System layer and I want that error message to propagate to Experience

⚡ Self-Test Mode Ready

layer. How?

✓ ANSWER

Use on-error-propagate at each layer. In the SAPI: catch the error → build standardized error

payload → re-throw using . In the PAPI: same pattern — on-error-propagate re-throws the error

upward. In the XAPI: on-error-propagate catches it → formats into the standard HTTP error response

format with correct status code.

The key: keep the error payload consistent at every layer. Use a standard error schema {correlationId,

errorCode, message, layer} so XAPI always knows what to expect regardless of which layer the error

originated from.

🎯🎯 Interview Pitch - Say It Like This (30 Sec)
"My philosophy on enterprise error handling is structured around predictability and actionable observability. I design a centralized Global Error Handler using On Error Propagate for unexpected system exceptions to guarantee transaction rollbacks and standardized HTTP 5xx responses, while using On Error Continue inside Try scopes for anticipated business fallbacks—always ensuring correlation IDs and structured JSON schemas are propagated."
💼💼 Real-Time Project Example

Project: Aviation — Core Integration Gateway.

Problem: Unhandled downstream 503 errors and connection timeouts were returning generic, unhelpful HTML error pages to frontend clients with zero traceability.

What I Did: Created an enterprise global error handler mapping HTTP:CONNECTIVITY, HTTP:TIMEOUT, and MULE:EXPRESSION to RFC 7807 Problem Details JSON, preserving X-Correlation-ID across all layers.

Result: Decreased mean time to resolution (MTTR) by 55% across support teams and ensured 100% consistent error responses across 20+ microservices.

Q19 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

System API is taking too long to respond (timeout). How do you fix it from XAPI's perspective?

⚡ Self-Test Mode Ready
✓ ANSWER

Three approaches depending on requirements:

1.Increase responseTimeout: On the HTTP Request config in PAPI that calls SAPI, increase

responseTimeout value. Quick fix but doesn't solve the root cause.

2.Async pattern (preferred): XAPI returns 202 Accepted immediately. PAPI publishes request to

Anypoint MQ. MQ consumer calls SAPI when it's ready. XAPI provides a polling endpoint or callback

URL for the result.

3.Retry with Until Successful: Wrap the SAPI call in Until Successful — if timeout occurs, retry up to

N times with a delay. Catch MULE:RETRY_EXHAUSTED → return 503 with Retry-After header to caller.

Q20 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

How do you implement CI/CD for MuleSoft? What Maven commands do you use?

⚡ Self-Test Mode Ready
✓ ANSWER

In our Enterprise Architecture: GitHub Actions triggers on push to any environment branch. Pipeline stages:

1.mvn clean compile — compile all source files
2.mvn test — run MUnit tests, generate coverage report
3.mvn sonar:sonar — upload coverage to SonarQube, enforce quality gate
4.mvn package — build deployable JAR artifact
5.mvn deploy -DmuleDeploy (with Mule Maven Plugin) — deploy to CloudHub target environment

Secrets (CloudHub credentials, connected app keys) stored in GitHub Secrets, passed as environment

variables to Maven. Deployment targets vary by branch: develop→sandbox, qa-branch→qa,

main→production. Maven Parent POM / BOM centralizes all shared plugin and connector versions — every enterprise API inherits from it.

Q1 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

What is the difference between DataWeave 1.0 and 2.0?

⚡ Self-Test Mode Ready
✓ ANSWER
FEATUREDATAWEAVE 1.0 (MULE 3)DATAWEAVE 2.0 (MULE 4)
Header%dw 1.0%dw 2.0
Conditionalwhen-otherwiseif-else
ImportsNot availableimport dw::core::Strings
Functions%function myFn(x) x + 1fun myFn(x) = x + 1
Variables%var x = 5var x = 5
OutputDeclared in headerDeclared in header with output keyword
🎯🎯 Interview Pitch - Say It Like This (30 Sec)
"DataWeave 2.0 is the core engine of our transformation layer. Rather than writing bulky Java components or iterative loops, I leverage DataWeave's functional paradigms—using map, filter, groupBy, and tail-recursive functions—and employ streaming annotations like @StreamCapable for multi-gigabyte payloads to maximize CPU cache locality and keep memory consumption minimal."
💼💼 Real-Time Project Example

Project: Commercial Banking — High-Volume Payload Transformation Service.

Problem: Transforming a 60MB nested XML payload containing 30,000 line items was consuming 1.2GB of heap memory and causing garbage collection pauses of up to 4 seconds.

What I Did: Rewrote the script using DataWeave 2.0 streaming with pluck, groupBy, and indexed lookups, avoiding eager array loading into JVM heap.

Result: Reduced memory footprint by 82% and dropped transformation execution time from 4.1s to 240ms.

Q2 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

What is the p() function in DataWeave? What is lookup()?

⚡ Self-Test Mode Ready
✓ ANSWER

p() function: Reads a value from a properties file (application properties, config YAML, Secure

Properties). Used to access configuration without hardcoding.

DataWeave — p() to read properties

DWL
%dw 2.0
output application/json
---
{ "appName": p('app.name'), "apiKey": p('secure::api.key') }

lookup() function: Invokes a Mule flow by name from within a DataWeave expression and returns its result. Can only call flows — not sub-flows.

DataWeave — lookup() to call a flow

DWL
%dw 2.0
output application/json
---
{ result: lookup('validateAddressFlow', {address: payload.address}) }
🎯🎯 Interview Pitch - Say It Like This (30 Sec)
"DataWeave 2.0 is the core engine of our transformation layer. Rather than writing bulky Java components or iterative loops, I leverage DataWeave's functional paradigms—using map, filter, groupBy, and tail-recursive functions—and employ streaming annotations like @StreamCapable for multi-gigabyte payloads to maximize CPU cache locality and keep memory consumption minimal."
💼💼 Real-Time Project Example

Project: Telecommunications — High-Volume Payload Transformation Service.

Problem: Transforming a 60MB nested XML payload containing 30,000 line items was consuming 1.2GB of heap memory and causing garbage collection pauses of up to 4 seconds.

What I Did: Rewrote the script using DataWeave 2.0 streaming with pluck, groupBy, and indexed lookups, avoiding eager array loading into JVM heap.

Result: Reduced memory footprint by 82% and dropped transformation execution time from 4.1s to 240ms.

Q3 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

What is the difference between flatten and flatMap?

⚡ Self-Test Mode Ready
✓ ANSWER
OPERATORINPUTOUTPUTUSE WHEN
flattenNested arrayOne-level-flattened arrayYou have [[1,2],[3,4]] and want [1,2,3,4]
flatMapArray + lambdaFlattened array after transformationMap each element to an array, then flatten all results

DataWeave — flatten vs flatMap

DWL
// flatten: turns nested arrays flat
[[3,5],[0.9,5.5]] flatten
// Output: [3, 5, 0.9, 5.5]
// flatMap: iterate + flatten in one operation
[[3,5],[0.9,5.5]] flatMap (value, index) -> value
// Output: [3, 5, 0.9, 5.5]
Q4 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

How do you skip null values in DataWeave? How do you mask sensitive data?

⚡ Self-Test Mode Ready
✓ ANSWER

DataWeave — skipNullOn

DWL
%dw 2.0
output application/json skipNullOn="everywhere"
---
{ "name": "John", "company": "MuleSoft", "designation": null }
// Output: { "name": "John", "company": "MuleSoft" }
// null fields are omitted from output
DataWeave — mask() operator (from dw::util::Values)
%dw 2.0
output application/json
import * from dw:-util:-Values
var data = { "name": "John", "ssn": "123-45-6789", "cardNo": "1234567890123456" }
---
(data mask "ssn" with "*---*--****") mask "cardNo" with "************3456"
🎯🎯 Interview Pitch - Say It Like This (30 Sec)
"DataWeave 2.0 is the core engine of our transformation layer. Rather than writing bulky Java components or iterative loops, I leverage DataWeave's functional paradigms—using map, filter, groupBy, and tail-recursive functions—and employ streaming annotations like @StreamCapable for multi-gigabyte payloads to maximize CPU cache locality and keep memory consumption minimal."
💼💼 Real-Time Project Example

Project: Logistics — High-Volume Payload Transformation Service.

Problem: Transforming a 60MB nested XML payload containing 30,000 line items was consuming 1.2GB of heap memory and causing garbage collection pauses of up to 4 seconds.

What I Did: Rewrote the script using DataWeave 2.0 streaming with pluck, groupBy, and indexed lookups, avoiding eager array loading into JVM heap.

Result: Reduced memory footprint by 82% and dropped transformation execution time from 4.1s to 240ms.

Q5 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

What is zip() function? How do you merge two arrays?

⚡ Self-Test Mode Ready
✓ ANSWER

zip() combines two arrays element-by-element into an array of pairs (arrays of 2 elements each).

DataWeave — zip() and flatten to merge

DWL
%dw 2.0
output application/json
---
// zip two arrays:
["Alice","Joe"] zip ["Integration Engineer", "Lead"]
// Output: [["Alice","Integration Engineer"],["Joe","Lead"]]
// Merge two arrays into one flat array:
import * from dw:-core:-Arrays
var a1 = ["a","b"]
var a2 = ["c","d"]
---
flatten([a1, a2])
// Output: ["a","b","c","d"]
Q6 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

What is sizeOf(), typeOf(), and how do you remove a key from an object?

⚡ Self-Test Mode Ready
✓ ANSWER

DataWeave — sizeOf, typeOf, remove key

DWL
%dw 2.0
output application/json
---
// sizeOf: count elements in array or keys in object
sizeOf([1,2,3,4])  // → 4
sizeOf({a:1, b:2}) // → 2
// typeOf: get the data type
typeOf([1,2,3])    // → "Array"
typeOf("hello")   // → "String"
typeOf(42)        // → "Number"
// Remove key with - operator:
var details = { name: "John", age: 25, ssn: "123" }
details - "ssn"
// Output: { name: "John", age: 25 }
// Use - to strip PII before sending to external systems
Q7 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

What is reduce() in DataWeave? Write examples for sum and string concat.

⚡ Self-Test Mode Ready
✓ ANSWER

DataWeave — reduce() for aggregation

DWL
%dw 2.0
output application/json
var numbers = [1, 2, 3, 4]
var salaries = [50000, 60000, 45000, 70000, 55000]
---
{
sum:     numbers reduce ((item, acc = 0) -> acc + item),   // 10
product: numbers reduce ((item, acc = 1) -> acc * item),   // 24
concat:  numbers reduce ((item, acc = "") -> acc ++ item), // "1234"
maxSalary: salaries reduce ((item, acc = 0) -> if (item > acc) item else acc) // 70000
}
🎯🎯 Interview Pitch - Say It Like This (30 Sec)
"DataWeave 2.0 is the core engine of our transformation layer. Rather than writing bulky Java components or iterative loops, I leverage DataWeave's functional paradigms—using map, filter, groupBy, and tail-recursive functions—and employ streaming annotations like @StreamCapable for multi-gigabyte payloads to maximize CPU cache locality and keep memory consumption minimal."
💼💼 Real-Time Project Example

Project: Energy & Utility — High-Volume Payload Transformation Service.

Problem: Transforming a 60MB nested XML payload containing 30,000 line items was consuming 1.2GB of heap memory and causing garbage collection pauses of up to 4 seconds.

What I Did: Rewrote the script using DataWeave 2.0 streaming with pluck, groupBy, and indexed lookups, avoiding eager array loading into JVM heap.

Result: Reduced memory footprint by 82% and dropped transformation execution time from 4.1s to 240ms.

Q8 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

What is match vs matches? What is read() vs readUrl()?

⚡ Self-Test Mode Ready
✓ ANSWER

DataWeave — match vs matches

// match: returns array of capture groups from regex match

"me@mulesoft.com" match(/([a-z]*-@([a-z]*-.com/)

// Output: ["me@mulesoft.com", "me", "mulesoft"]

// matches: returns boolean — does entire string match?

"admin123" matches /a.*\d+/ // true

"admin123" matches /^b.+/ // false

DataWeave — read() vs readUrl()

// read(): parses a string or binary as a specific MIME type

read('{ "Hello": "World" }', 'application/json')

// Output: parsed JSON object

// readUrl(): reads from URL (including classpath)

readUrl("classpath:--config/mapping.json", "application/json")

// Reads from src/main/resources/config/mapping.json

Q9 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

How do you access secure properties inside DataWeave? How to encode/decode base64?

⚡ Self-Test Mode Ready
✓ ANSWER

DataWeave — Secure properties + base64

DWL
%dw 2.0
output application/json
import toBase64 from dw:-core:-Binaries
import fromBase64 from dw:-core:-Binaries
---
{
// Access secure property:
apiKey: p('secure:-api.clientSecret'),
// Base64 encode:
encoded: toBase64("Secret"),      // "U2VjcmV0"
// Base64 decode:
decoded: fromBase64("U2VjcmV0") // "Secret"
}
🎯🎯 Interview Pitch - Say It Like This (30 Sec)
"DataWeave 2.0 is the core engine of our transformation layer. Rather than writing bulky Java components or iterative loops, I leverage DataWeave's functional paradigms—using map, filter, groupBy, and tail-recursive functions—and employ streaming annotations like @StreamCapable for multi-gigabyte payloads to maximize CPU cache locality and keep memory consumption minimal."
💼💼 Real-Time Project Example

Project: Commercial Banking — High-Volume Payload Transformation Service.

Problem: Transforming a 60MB nested XML payload containing 30,000 line items was consuming 1.2GB of heap memory and causing garbage collection pauses of up to 4 seconds.

What I Did: Rewrote the script using DataWeave 2.0 streaming with pluck, groupBy, and indexed lookups, avoiding eager array loading into JVM heap.

Result: Reduced memory footprint by 82% and dropped transformation execution time from 4.1s to 240ms.

Q10 [DEVELOPER / SENIOR] ⏱️ 1 min read Module U

Write DataWeave to check if a number is even or odd. How to convert string to Number?

⚡ Self-Test Mode Ready
✓ ANSWER

DataWeave — Even/Odd + type conversion

DWL
%dw 2.0
output application/json
var n = attributes.queryParams.number as Number
---
// Even or odd:
if ((n mod 2) == 0) { result: "Even" } else { result: "Odd" }
// String to Number:
"345.60" as Number  // 345.60
// Number to String:
345.60 as String    // "345.6"
// String to Date:
"2026-10-16" as Date {format: "yyyy-MM-dd"}
🎯🎯 Interview Pitch - Say It Like This (30 Sec)
"DataWeave 2.0 is the core engine of our transformation layer. Rather than writing bulky Java components or iterative loops, I leverage DataWeave's functional paradigms—using map, filter, groupBy, and tail-recursive functions—and employ streaming annotations like @StreamCapable for multi-gigabyte payloads to maximize CPU cache locality and keep memory consumption minimal."
💼💼 Real-Time Project Example

Project: Telecommunications — High-Volume Payload Transformation Service.

Problem: Transforming a 60MB nested XML payload containing 30,000 line items was consuming 1.2GB of heap memory and causing garbage collection pauses of up to 4 seconds.

What I Did: Rewrote the script using DataWeave 2.0 streaming with pluck, groupBy, and indexed lookups, avoiding eager array loading into JVM heap.

Result: Reduced memory footprint by 82% and dropped transformation execution time from 4.1s to 240ms.

← Quick Reference Interview Cheat SheetAdvanced DataWeave Transformations & Scrip →