glossary · The process

Sub-workflow

definition

A sub-workflow is a complete workflow started from a decision inside another workflow: the parent pauses, the sub-workflow runs on the same piece of work until it finishes, and then the parent continues.

in one line: A detour on the same task. The parent waits, then carries on.

in context

Where does a sub-workflow fit?

A detour always comes back. In ConvOps, a decision opens it only when needed, and when it ends the parent continues.

triage
scope unclear?
researchsub-workflow
back on lineparent resumes
done
two ways to say it

What is a sub-workflow, in plain words?

Same idea at two depths: the plain version, then what the engine actually does.

The main line stays short. Optional work lives in detours that a decision starts when it applies.

Improve a sub-workflow once and every parent that calls it improves.

for engineers

A condition with invoke starts a child instance on the same task; the parent waits. Up to five levels deep.

Control returns, not a payload. Data travels through the task, notes and memory.

the longer answer

Why does a sub-workflow matter?

Sub-workflows are how a process handles optional or conditional work without becoming tangled. Instead of a main line full of steps that are sometimes skipped, the main line stays short, and a decision opens a detour only when it is needed: research when the scope is unclear, a security review when the change touches authentication, a fix pass when a review fails.

The defining property is that a detour returns. A sub-workflow is a side trip, not a jump. When it completes, control comes back to the parent, either to the next step or to an earlier step the parent names. That keeps every run at one known place and keeps the parent readable: a reviewer reasons only about "forward by one" and "take a detour".

Sub-workflows also make reuse natural. The same review or research process can be started from many parents, and improving it once improves every parent that calls it.

in convops

How does a sub-workflow work in ConvOps?

In ConvOps, a decision step lists conditions, and a condition can name a sub-workflow to invoke. When that condition is chosen, the engine starts the sub-workflow on the same task and puts the parent in a waiting state. Sub-workflows can nest up to five levels deep. When the child finishes, the parent resumes at its next step, or at the step named in the decision's resume point, which is how fix loops are built. Two things to know: a condition that names no sub-workflow simply records the choice and continues, and a sub-workflow returns control, not a result payload. Shared data travels through the task itself, its notes and the workspace memory. The engine deliberately has no "go to any step" primitive; detours and loops cover the real needs while keeping workflows readable.

questions

What do people ask about a sub-workflow?

What is a sub-workflow in ConvOps?

A sub-workflow is a complete workflow started from a decision inside another workflow: the parent waits, the sub-workflow runs on the same task, and the parent then continues. In ConvOps a decision condition names the sub-workflow to invoke, and when the child finishes the parent resumes at its next step or at the step the decision names. Sub-workflows nest up to five levels deep.

What is the difference between a sub-workflow and a workflow fragment?

A sub-workflow is a detour a decision starts at run time, while a fragment is a block of steps inlined into every workflow that embeds it. In ConvOps a sub-workflow gets its own instance while the parent waits. Use fragments for steps that always run, and sub-workflows for work needed on some paths only, such as a security review when a change touches sign-in.

How deep can sub-workflows nest in ConvOps?

Up to five levels deep in ConvOps. When a child finishes, the parent resumes at its next step, or at the step the decision names as its resume point, which is how fix loops are built. The engine has no primitive for jumping to any step, so every detour returns to the parent that started it.

Does a sub-workflow return data to its parent?

It returns control, not a result payload. In ConvOps, shared data travels through the task itself, its notes and the workspace memory, so the parent reads what the child produced from those. A condition that names no sub-workflow simply records the choice and continues on the parent's line.

Who builds sub-workflows?

Workflow owners whose process has optional paths, such as a security review only when sign-in code changes or a legal check only for certain contracts. In ConvOps they build each path once as a sub-workflow and invoke it from a decision, so the main workflow stays short and the detour returns to it when done.