Routing Events8% of the exam

Validation module and idempotent message validation

Pick the right Validation module operation and predict the `VALIDATION:*` error it throws, combine checks with the All and Any scopes, and reject repeated messages with the Idempotent Message Validator and `MULE:DUPLICATE_MESSAGE`.

Official exam objective
Apply correct processors/syntax to validate Mule events, and predict outcomes.

~7 min read · 7 practice questions ·

What the exam expects

  • Choose the Validation operation that matches a rule (Is email, Is not blank string, Validate size, Is number, Is true) and write its XML with a custom message.
  • Predict the error a failed validation throws, and which type values on an On Error component catch it.
  • Predict the outcome of the All and Any scopes when some or all nested validations fail.
  • Configure the Idempotent Message Validator's idExpression and object store, and predict MULE:DUPLICATE_MESSAGE.

Key terms:

  • Validation operation: passes the event on or throws; never returns false.
  • VALIDATION:VALIDATION: the parent of every Validation module error type.
  • All / Any scope: group validations behind one VALIDATION:MULTIPLE error.
  • Idempotent Message Validator: lets only messages with an unseen ID continue.
  • idExpression: produces the message ID.

Key facts

Failed validation
Detail
Throws an error that is always a child of VALIDATION:VALIDATION
Is not blank string
Detail
Throws VALIDATION:BLANK_STRING
Validate size
Detail
Inclusive min (default 0) and max; String size is its length
Is number
Detail
Out-of-range or unparsable value throws VALIDATION:INVALID_NUMBER
Is true / Is false
Detail
Both throw VALIDATION:INVALID_BOOLEAN; expression defaults to false
All scope
Detail
Runs every validation; any failure gives one VALIDATION:MULTIPLE
Any scope
Detail
VALIDATION:MULTIPLE only if all nested validations failed
Idempotent idExpression
Detail
Defaults to #[correlationId]
Idempotent default store
Detail
Not persistent, entry TTL of 5 MINUTES
Duplicate message
Detail
Throws MULE:DUPLICATE_MESSAGE
Sources for this section (3)
  • What does Validate size's min default to, and which kinds of value can it measure?
  • Why does setting the Idempotent Message Validator's Value Expression change nothing?
  • Why does an Is true operation with no expression configured fail?
  • Where do you find the error type each Validation operation throws?

The questions are free to read. Answers with their sources and self-grading are included with the pack.

Keep reading with the MuleSoft Developer pack

  • Core concepts
  • Exam traps
  • Worked scenario

The pack includes:

  • All 40 lessons of the MuleSoft Developer guide, with reading progress
  • Interactive decision walks and step-by-step sequence steppers
  • Practice exams purchase adds inline bank questions and topic practice (7 questions for this lesson)
  • An official source cited for every claim
  • An AI tutor that answers from the guide
  • Unlimited timed practice exams

Practice for the MuleSoft Developer exam