# Try scope error handling and transactions

*MuleSoft Developer Study Guide · Handling Errors · Last updated October 28, 2026 · https://www.certifyforce.com/study-guide/mulesoft-developer/handling-errors/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.

- Certification: Salesforce MuleSoft Developer
- Exam section: Handling Errors
- Study guide: https://www.certifyforce.com/study-guide/mulesoft-developer

**Official exam objective:**

> Apply correct processors /syntax to implement try scopes, and predict outcomes.

## 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

| Fact | Detail | Source |
|---|---|---|
| After an error in a Try scope | Remaining components in the scope are not executed | [Try Scope](https://docs.mulesoft.com/mule-runtime/latest/try-scope-concept) |
| On Error Continue in a Try scope | Processing continues at the next component after the scope | [Try Scope](https://docs.mulesoft.com/mule-runtime/latest/try-scope-concept) |
| On Error Propagate in a Try scope | Error goes to the flow's Error Handler as if the Try did not exist | [Try Scope](https://docs.mulesoft.com/mule-runtime/latest/try-scope-concept) |
| Payload and variable changes in handlers | Propagated through the rest of the execution | [Try Scope](https://docs.mulesoft.com/mule-runtime/latest/try-scope-concept) |
| Try Error Handler content | One `<error-handler>` with at least one On-Error component; first match runs | [Try Scope XML Reference](https://docs.mulesoft.com/mule-runtime/latest/try-scope-xml-reference) |
| `transactionalAction` default | `INDIFFERENT` | [Try Scope XML Reference](https://docs.mulesoft.com/mule-runtime/latest/try-scope-xml-reference) |
| `transactionalType` default | `LOCAL` (other value `XA`) | [Try Scope XML Reference](https://docs.mulesoft.com/mule-runtime/latest/try-scope-xml-reference) |
| `ALWAYS_BEGIN` inside an active transaction | Raises an error | [Try Scope](https://docs.mulesoft.com/mule-runtime/latest/try-scope-concept) |
| Subflow error handling | No built-in Error Handler; use a Try scope inside | [Flow and Subflow Scopes](https://docs.mulesoft.com/mule-runtime/latest/flow-component) |

## Check yourself

- 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?

## Sources

- [Try Scope](https://docs.mulesoft.com/mule-runtime/latest/try-scope-concept)
- [Try Scope XML Reference](https://docs.mulesoft.com/mule-runtime/latest/try-scope-xml-reference)
- [On-Error Components](https://docs.mulesoft.com/mule-runtime/latest/on-error-scope-concept)
- [Flow and Subflow Scopes](https://docs.mulesoft.com/mule-runtime/latest/flow-component)
- [Scatter-Gather Router](https://docs.mulesoft.com/mule-runtime/latest/scatter-gather-concept)
- [Global Configurations](https://docs.mulesoft.com/mule-runtime/latest/global-settings-configuration)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 4 linked practice questions, and unlimited timed mock exams are included with the MuleSoft Developer pack (USD $19): https://www.certifyforce.com/practice-exams
