# Function loadWorkflowFile

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

- loadWorkflowFile(
  filePath: string,
  allowedRoot?: string,
  ): Promise<Result<WorkflowDefinition, SecurityError | ParseError>>

  Loads and parses a workflow definition from a file.

  #### Parameters

  - filePath: string

    Path to the workflow file

  - allowedRoot: string = ...

    Root directory for path validation (defaults to process.cwd())

  #### Returns Promise<Result<WorkflowDefinition, SecurityError | ParseError>>

  Result with WorkflowDefinition or ParseError/SecurityError

  - Defined in packages/nexus-agents/src/workflows/workflow-parser.ts:223