Handling Errors8% of the exam

Try scope error handling and transactions

Write a Try scope with its own Error Handler and predict the payload, variables and next processor after an error is continued or propagated; use a Try scope inside a subflow or a Scatter-Gather route; and choose transactionalAction INDIFFERENT, ALWAYS_BEGIN or BEGIN_OR_JOIN.

Official exam objective
Apply correct processors /syntax to implement try scopes, and predict outcomes.

~7 min read · 4 practice questions ·

What the exam expects

  • Write a <try> scope with its own <error-handler> and predict the payload and the next processor that runs after an error inside it.
  • Predict whether the flow's Error Handler runs when the Try scope's handler continues or propagates, and what happens to variables set in either handler.
  • Add error handling to a subflow (or a Scatter-Gather route) with a Try scope.
  • Choose transactionalAction (INDIFFERENT, ALWAYS_BEGIN, BEGIN_OR_JOIN) and state the defaults.

Key terms:

  • Try scope (<try>): wraps processors and handles their errors inline with its own Error Handler, like a separate flow without defining one.
  • transactionalAction: whether the scope begins, joins or ignores a transaction; default INDIFFERENT.
  • transactionalType: LOCAL (default) or XA, used only when the scope creates a transaction.

Key facts

After an error in a Try scope
Detail
Remaining components in the scope are not executed
On Error Continue in a Try scope
Detail
Processing continues at the next component after the scope
On Error Propagate in a Try scope
Detail
Error goes to the flow's Error Handler as if the Try did not exist
Payload and variable changes in handlers
Detail
Propagated through the rest of the execution
Try Error Handler content
Detail
One <error-handler> with at least one On-Error component; first match runs
transactionalAction default
Detail
INDIFFERENT
transactionalType default
Detail
LOCAL (other value XA)
ALWAYS_BEGIN inside an active transaction
Detail
Raises an error
Subflow error handling
Detail
No built-in Error Handler; use a Try scope inside
Sources for this section (3)
  • What happens to a Try scope's transaction when none of its operations fails?
  • Why does transactionalType make no difference under INDIFFERENT?
  • When should a Try scope use BEGIN_OR_JOIN instead of ALWAYS_BEGIN?
  • What must a Try scope's Error Handler contain, and which strategy runs when several match?

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 (4 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