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. A decision opens it only when needed. 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 the difference between a sub-workflow and a workflow fragment?

A sub-workflow is a detour a decision starts at run time, with its own instance while the parent waits. A fragment is a block of steps inlined into every workflow that embeds it. Use fragments for steps that always run and sub-workflows for work on some paths only.

How deep can sub-workflows nest in ConvOps?

Up to five levels deep. When a child finishes, the parent resumes at its next step, or at the step the decision names as its resume point.

Does a sub-workflow return data to its parent?

It returns control, not a result payload. Shared data travels through the task itself, its notes and the workspace memory.