createWorkflow method
Create workflow
Implementation
@override
Future<Workflow> createWorkflow(Workflow workflow) async {
final workflowWithDefaults = workflow.copyWith(
createdAt: DateTime.now(),
updatedAt: DateTime.now(),
status: WorkflowStatus.pending,
id: workflow.id.isNotEmpty ? workflow.id : 'workflow_${DateTime.now().millisecondsSinceEpoch}',
);
_workflows[workflowWithDefaults.id] = workflowWithDefaults;
return workflowWithDefaults;
}