Job constructor
Job({
- required String name,
- required List<
BaseStep> steps, - Map<
String, dynamic> jobParameters = const {}, - FutureOr<
bool> precondition(- ExecutionContext context
- dynamic onStarted(
- ExecutionContext context
- dynamic onSucceeded(
- ExecutionContext context
- dynamic onError(
- ExecutionContext context,
- dynamic error,
- StackTrace stackTrace
- dynamic onCompleted(
- ExecutionContext context
- List<
Job> branchesOnSucceeded = const [], - List<
Job> branchesOnFailed = const [], - List<
Job> branchesOnCompleted = const [],
Returns the new instance of Job.
Implementation
Job({
required String name,
required this.steps,
this.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,
precondition: precondition,
onStarted: onStarted,
onError: onError,
onSucceeded: onSucceeded,
onCompleted: onCompleted,
branchesOnSucceeded: branchesOnSucceeded,
branchesOnFailed: branchesOnFailed,
branchesOnCompleted: branchesOnCompleted,
);