ScheduledJob constructor

ScheduledJob({
  1. required String name,
  2. required ScheduleParser<Schedule> schedule,
  3. required List<BaseStep> steps,
  4. Map<String, dynamic> jobParameters = const {},
  5. FutureOr<bool> precondition(
    1. ExecutionContext context
    )?,
  6. dynamic onStarted(
    1. ExecutionContext context
    )?,
  7. dynamic onSucceeded(
    1. ExecutionContext context
    )?,
  8. dynamic onError(
    1. ExecutionContext context,
    2. dynamic error,
    3. StackTrace stackTrace
    )?,
  9. dynamic onCompleted(
    1. ExecutionContext context
    )?,
  10. List<Job> branchesOnSucceeded = const [],
  11. List<Job> branchesOnFailed = const [],
  12. List<Job> branchesOnCompleted = const [],
})

Returns the new instance of ScheduledWorkflow.

Implementation

ScheduledJob({
  required String name,
  required this.schedule,
  required List<BaseStep> steps,
  Map<String, dynamic> jobParameters = const {},
  FutureOr<bool> Function(ExecutionContext context)? precondition,
  Function(ExecutionContext context)? onStarted,
  Function(ExecutionContext context)? onSucceeded,
  Function(ExecutionContext context, dynamic error, StackTrace stackTrace)?
      onError,
  Function(ExecutionContext context)? onCompleted,
  List<Job> branchesOnSucceeded = const [],
  List<Job> branchesOnFailed = const [],
  List<Job> branchesOnCompleted = const [],
}) : super(
        name: name,
        steps: steps,
        jobParameters: jobParameters,
        precondition: precondition,
        onStarted: onStarted,
        onError: onError,
        onSucceeded: onSucceeded,
        onCompleted: onCompleted,
        branchesOnSucceeded: branchesOnSucceeded,
        branchesOnFailed: branchesOnFailed,
        branchesOnCompleted: branchesOnCompleted,
      );