GitHub user yangzhang75 edited a discussion: Proposal: Unify Macro & Template 
(one concept, two use cases)

## Summary
A **Macro** is a reusable, parameterized piece of workflow. The "Template" idea
from #6070 is really just an **edge case of a Macro** — a macro used to generate
a whole workflow. So instead of two separate features, we treat **Macro as the
general concept**.

A Macro can be used **two ways**:
1. **Inside a workflow** — embed it as a building-block node.
<img width="1454" height="772" alt="Screenshot 2026-08-06 at 4 38 21 PM" 
src="https://github.com/user-attachments/assets/d81f320e-d975-409f-81ac-bac4ec0183bc";
 />

2. **To generate a workflow** — fill its parameters to produce a runnable
   workflow. This is the real use case for biologists.
<img width="1464" height="773" alt="Screenshot 2026-08-06 at 4 37 45 PM" 
src="https://github.com/user-attachments/assets/be5715c4-52ba-4fdd-a6b8-6a3d57abfa76";
 />


## Background
#6070 proposed **Templates**: on a whole workflow, mark some operator properties
as configurable, let a user fill a small form, and generate a new runnable
workflow. We also have **Macros** (#5115): reusable sub-graphs you drop into a
workflow. These are the same underlying idea — so rather than maintain two
features, a Template becomes a special case of a Macro.

## The two ways to use a Macro
1. **Inside a workflow (building block).** Drop a Macro node onto the canvas;
   macros can be nested.
2. **To generate a workflow (biologist use case).** A dedicated page shows a
   read-only preview plus a form of just the macro's configurable parameters;
   fill them and Run to produce an independent, runnable workflow. This is what
   #6070 called a Template.

## How Macro and Template relate
- A macro that isn't runnable on its own → a building block used inside a
  workflow (way 1).
- A macro that is runnable on its own → can generate a complete workflow
  (way 2). **That's the old Template.**

## Sharing
A Macro can be shared / made public and browsed in the Hub, like workflows.

## Status
A working prototype exists. Design details are still being worked out — this is
mainly to align on the overall direction.

Continues #6070.

GitHub link: https://github.com/apache/texera/discussions/7368

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to