load method
Loads a workflow from path, defaulting to WORKFLOW.md.
Implementation
Future<WorkflowDefinition> load({String? path}) async {
final workflowPath = path ?? defaultWorkflowPath;
final file = File(workflowPath);
if (!file.existsSync()) {
throw WorkflowException(
WorkflowFailureCode.missingWorkflowFile,
'Workflow file not found: $workflowPath',
);
}
final content = await file.readAsString();
return parse(content, path: file.path);
}