defineWorkflow
Purpose and behavior
Section titled “Purpose and behavior”Validate a named task list and return a frozen Workflow whose start() runs the graph and diagram() draws it as Mermaid. Throws on an empty name, a duplicate key, a dependency missing from the list, a cycle, or a gate with a condition, retry, timeout or cache.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”nameRequiredstringWorkflow name, not empty; part of the checkpoint identity and of every event.tasksRequiredreadonly Task<unknown>[]Every task of the graph; each dependency must also be in the list.