Proposal: Workflow Templates — save a workflow as a reusable, parameterized template #6070
Replies: 6 comments 8 replies
-
|
Beta Was this translation helpful? Give feedback.
-
|
This "template" feature is based on the requests from many users, especially in the medical domain. In particular, biologists and "Web Lab researchers" don't want to use a workflow as it is too "complicated" to them. They prefer a simpler "form" interface on which they can just change a few parameters. Regarding the four questions:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
@mengw15 Regarding your first point about "what a template is," its main motivation is to make it easier for some users (e.g., biologists) who don't like a workflow interface to easily create a workflow. A template can be viewed as "a workflow with placeholders or parameters." A template is NOT designed to create multiple workflows. @yangzhang75 : In this discussion, let's ignore the current implementation. We should focus on the user experience, then decide how to implement it. In general, a key question is: after a workflow is created, if we change the template, do we need to update the correspond workflow? My preference is "No," so that the maintenance becomes easier. |
Beta Was this translation helpful? Give feedback.
-
|
Hmm, I feel this is similar to macro idea. Suppose I have A->B ->C workflow (each as an operator).
The only difference is template is represented as a subDAG, and macro is represented as a high-level operator with the subDAG details hidden. I feel we could unify them (e.g., give user an option to expand a macro to see the subDAG, or collapse a subDAG (template) into a Marco. |
Beta Was this translation helpful? Give feedback.
-
|
Following the UX we've converged on above, here's the concrete design to implement it. Agreed decisions
Motivation: give users who find the canvas too complex (e.g. biologists) a simple, form‑based way to create a workflow. Data model
erDiagram
template ||--o{ workflow_of_template : "1 template -> N workflows"
workflow ||--o| workflow_of_template : "origin of each generated workflow"
template {
serial tid PK
varchar name
varchar description
text content "graph + per-operator configurableProperties whitelist"
timestamp creation_time
timestamp last_modified_time
}
workflow_of_template {
int wid PK "FK -> workflow, ON DELETE CASCADE"
int tid FK "-> template, nullable"
timestamp created_at
}
workflow {
int wid PK
varchar name
text content
}
Ownership/sharing reuse User flow
ServicesSingle Open questions
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What it does
In current Texera main, sharing a workflow means sharing the whole editable graph. If someone wants to reuse a colleague's pipeline with their own input file or a different threshold, they have to open the full canvas, find the right operator, and edit it by hand — easy to get wrong, and it exposes the whole pipeline to accidental edits.
This proposal adds Workflow Templates. An author turns a workflow into a template and marks a few operator properties as configurable. Anyone with access then instantiates their own workflow by filling in a short form for just those properties — without touching, or even seeing, the rest of the graph. The result is a normal, runnable workflow they own.
The case that motivated it: a lab publishes an analysis pipeline (e.g. a scGPT single-cell workflow), and end users just point it at their own dataset and hit run.
flowchart TD A["Author's workflow"] -->|"Make Template"| B["Opens in template mode"] B -->|"tick the configurable properties,<br/>then save"| C["Template<br/>(stored and shared like a workflow)"] C -->|"open → POST /build<br/>(idempotent: created once)"| D["Instantiated workflow<br/>(the user owns it)"] D --> E["Build page<br/>form on top, runnable preview below"] E -->|"Submit → POST /update<br/>(whitelisted keys only, new version)"| D E -->|"Run the preview"| F["Results"]How it works
Authoring. From any workflow, the author clicks Make Template and checks which operator properties should stay editable. The workflow is saved as a template in which everything is locked except those checked properties (stored per operator as a
configurablePropertieswhitelist). It's stored and shared like a workflow — owner plus per-user access.Instantiating. Anyone with access builds their own workflow from the template. They can change only the checked properties; the rest of the graph is fixed and not editable. Values are applied server-side into the workflow content, restricted to the whitelist, and stored as raw JSON so typed values (like file references) round-trip losslessly.
A new
Parametersource operator lets a template expose typed inputs (key/value pairs, file references) as first-class graph inputs.The build page
The "Build workflow from template" page shows the configurable-property form on top, and a live, read-only but runnable preview of the workflow below it — so a user can build, run, and see results on one page, without being able to edit the graph.
Open questions
Feedback welcome on the overall approach and on these four.
Beta Was this translation helpful? Give feedback.
All reactions