# Flow references, target variables and templates

*MuleSoft Platform Integration Architect Study Guide · Designing and developing Mule applications · Last updated November 13, 2026 · https://www.certifyforce.com/study-guide/mulesoft-platform-integration-architect/designing-and-developing-mule-applications/flow-references-target-variables-and-templates*

How core features every Mule application has (flows and subflows, Flow Reference, target variables, On-Error components and Parse Template) shape the message a flow sees, including what a referenced flow's error handler returns to its caller.

- Certification: Salesforce MuleSoft Platform Integration Architect
- Exam section: Designing and developing Mule applications
- Study guide: https://www.certifyforce.com/study-guide/mulesoft-platform-integration-architect

**Official exam objective:**

> Select and use fundamental features available to all Mule applications.

## What the exam expects

- Choose between a flow and a subflow for reusable logic, given its need for a source or its own error handling.
- Predict the payload and variables after a Flow Reference, with and without a target variable, including when the referenced flow handles its own error.
- Distinguish On Error Continue from On Error Propagate by what they return to the owner and to a calling flow.
- Configure target variables (Target and Target Value) to keep the current message while storing an operation's result.
- Select Parse Template for text with embedded Mule expressions, and configure its template inline or from a file.

**Core component:** a component built into Mule runtime, such as Flow Reference, Set Variable, Logger, Choice or Try, available to every application. **Flow Reference:** routes the event to another flow or subflow in the same application and then back. **Target variable:** a variable named in an operation's Target field that stores its result instead of replacing the message. **On-Error component:** On Error Continue or On Error Propagate inside an Error Handler. **Template:** text with embedded Mule expressions that Parse Template evaluates and replaces with their results ([Mule Components](https://docs.mulesoft.com/mule-runtime/latest/mule-components), [Flow Reference](https://docs.mulesoft.com/mule-runtime/latest/flowref-about), [Parse Template](https://docs.mulesoft.com/mule-runtime/latest/parse-template-reference)).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Subflow limits | No event source, no error handling scope | [Flows and Subflows](https://docs.mulesoft.com/mule-runtime/latest/about-flows) |
| Subflow at build time | Each Flow Reference is replaced by its contents | [Flows and Subflows](https://docs.mulesoft.com/mule-runtime/latest/about-flows) |
| Flow name | Use the literal name; dynamic names hurt performance and block MUnit analysis | [Flow Reference](https://docs.mulesoft.com/mule-runtime/latest/flowref-about) |
| Flow Reference with target | Original payload and variables kept; result stored in the variable | [Flow Reference](https://docs.mulesoft.com/mule-runtime/latest/flowref-about) |
| Error in a referenced flow | Its own handler runs; with no handler, the caller's handler gets the error | [Flow Reference](https://docs.mulesoft.com/mule-runtime/latest/flowref-about) |
| Target after an error | Not set | [Target variables](https://docs.mulesoft.com/mule-runtime/latest/target-variables) |
| On Error Continue | Its result becomes the owner's successful result | [On-Error Components](https://docs.mulesoft.com/mule-runtime/latest/on-error-scope-concept) |
| Target name characters | Numbers, characters, underscores; no hyphens | [Target variables](https://docs.mulesoft.com/mule-runtime/latest/target-variables) |
| Target Value default | The payload; `vars` keyword not accepted | [Target variables](https://docs.mulesoft.com/mule-runtime/latest/target-variables) |
| Parse Template sources | `location` (file) or `content` (inline string) | [Parse Template](https://docs.mulesoft.com/mule-runtime/latest/parse-template-reference) |

## Check yourself

- When must a quoted sub-expression in a template be wrapped in another `#[]`?
- Why would a template contain `\#[`?
- When would you configure a flow as initially stopped, and how is it started?

## Sources

- [Flow Reference Component](https://docs.mulesoft.com/mule-runtime/latest/flowref-about)
- [Enrich Data with Target Variables](https://docs.mulesoft.com/mule-runtime/latest/target-variables)
- [On-Error Components](https://docs.mulesoft.com/mule-runtime/latest/on-error-scope-concept)
- [Flows and Subflows](https://docs.mulesoft.com/mule-runtime/latest/about-flows)
- [Parse Template Reference](https://docs.mulesoft.com/mule-runtime/latest/parse-template-reference)
- [Mule Components](https://docs.mulesoft.com/mule-runtime/latest/mule-components)

## About the full unit

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