Job class
This object represents the largest unit of events in the workflow.
This event must have multiple steps, but need not be scheduled. In other words,
this Job event is expected to be executed immediately when the execution conditions
are met from the branch
specification. It is similar to ScheduledJob
, but
differs in that it may or may not be scheduled.
In addition, the Job event can set jobParameters parameters that are shared
in scope between BaseStep
s associated with this Job. This is a similar specification to
SharedParameters
, except that the scope in which the parameters are shared is different.
- Implementers
Constructors
-
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.
Properties
-
branches
→ List<
Branch< Job> > -
The branches
finalinherited
- hasBranch → bool
-
Returns true if this event has branch, otherwise false.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasRetryPolicy → bool
-
Returns true if this event has retry policy, otherwise false.
no setterinherited
- hasSkipPolicy → bool
-
Returns true if this event has skip policy, otherwise false.
no setterinherited
-
jobParameters
→ Map<
String, dynamic> -
The initial job parameters.
final
- name → String
-
The name
finalinherited
- onCompleted → (dynamic Function(ExecutionContext context)?)
-
The callback when this process is completed (regardless of success and failure)
finalinherited
- onError → (dynamic Function(ExecutionContext context, dynamic error, StackTrace stackTrace)?)
-
The callback when this process is stopped due to exception
finalinherited
- onStarted → (dynamic Function(ExecutionContext context)?)
-
The callback when this process is started
finalinherited
- onSucceeded → (dynamic Function(ExecutionContext context)?)
-
The callback when this process is succeeded
finalinherited
-
precondition
→ (FutureOr<
bool> Function(ExecutionContext context)?) -
The precondition
finalinherited
- retryPolicy → RetryPolicy?
-
The retry policy
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skipPolicy → SkipPolicy?
-
The skip policy
finalinherited
-
steps
→ List<
BaseStep> -
The steps
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldLaunch(
ExecutionContext context) → Future< bool> -
Returns true if this event can launch, otherwise false.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited