copyWith method

Workflow copyWith({
  1. String? id,
  2. String? name,
  3. String? description,
  4. List<WorkflowStep>? steps,
  5. String? startStepId,
  6. Map<String, dynamic>? initialData,
  7. WorkflowStatus? status,
  8. DateTime? createdAt,
  9. DateTime? updatedAt,
  10. String? version,
  11. int? priority,
  12. bool? isEnabled,
  13. List<String>? tags,
  14. Map<String, String>? metadata,
  15. Map<String, dynamic>? triggerConditions,
  16. int? maxRetries,
  17. Duration? executionTimeout,
})

Implementation

Workflow copyWith({
  String? id,
  String? name,
  String? description,
  List<WorkflowStep>? steps,
  String? startStepId,
  Map<String, dynamic>? initialData,
  WorkflowStatus? status,
  DateTime? createdAt,
  DateTime? updatedAt,
  String? version,
  int? priority,
  bool? isEnabled,
  List<String>? tags,
  Map<String, String>? metadata,
  Map<String, dynamic>? triggerConditions,
  int? maxRetries,
  Duration? executionTimeout,
}) {
  return Workflow(
    id: id ?? this.id,
    name: name ?? this.name,
    description: description ?? this.description,
    steps: steps ?? this.steps,
    startStepId: startStepId ?? this.startStepId,
    initialData: initialData ?? this.initialData,
    status: status ?? this.status,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
    version: version ?? this.version,
    priority: priority ?? this.priority,
    isEnabled: isEnabled ?? this.isEnabled,
    tags: tags ?? this.tags,
    metadata: metadata ?? this.metadata,
    triggerConditions: triggerConditions ?? this.triggerConditions,
    maxRetries: maxRetries ?? this.maxRetries,
    executionTimeout: executionTimeout ?? this.executionTimeout,
  );
}