# Function getTopologicalOrder

Workflows exports - Workflow engine with parallel execution Split from index.ts for file size compliance (Issue #285)

- getTopologicalOrder(workflow: WorkflowDefinition): Result<string[], ParseError>

  Gets the topologically sorted execution order for a workflow. Used for parsing validation (returns ParseError). For execution planning, use createExecutionPlan from execution-planner.

  #### Parameters

  - workflow: WorkflowDefinition

    The workflow definition

  #### Returns Result<string[], ParseError>

  Result with sorted step IDs or ParseError

  - Defined in packages/nexus-agents/src/workflows/dependency-graph.ts:306