Skip to main content

CALL_TEMPLATE

Calls a reusable flow by legacy template name (name) or scoped reference (ref).

At a glance

  • Category Control
  • Aliases CALL_FLOW
  • Version: 1.0.6
  • Applications: all
  • Scope: all

Config Options

NameDescriptionDefaultRequiredResolvedConstraintsConditional Rules
nameThe name of the template to call from the TEMPLATES: section.NonefalsetrueNoneNone
refReference path to a reusable flow (for example global.flows.myFlow or imports.common.flows.myFlow).NonefalsetrueNoneNone

Step-Level Validation Rules

Require At Least One:

  • At least one of: name, ref

Examples

Call a template

 - step: CALL_TEMPLATE
name: "myTemplate"

Call a scoped flow by reference

 - step: CALL_FLOW
ref: "section.flows.myFlow"

Common Patterns

Dynamic Template Selection

You can use template expressions to dynamically select which template to call at runtime.


- step: SET
templateToRun: "{{ flowContext.userChoice }}"

- step: CALL_TEMPLATE
name: "{{ flowContext.templateToRun }}"

Scoped Flow Reference

Use explicit scoped refs for reusable flows in BLOCKS/imports namespaces.


- step: CALL_FLOW
ref: "section.flows.normalize"

Common Pitfalls

Expecting END_IF or BREAK to stop the parent workflow

Why: Templates execute in an isolated flow control context. Flow control steps inside a template only affect the template itself.

Solution: Use the END step if you need to stop the entire workflow from within a template.

See Also

General Resources: