JobInterface defines the contract for job objects that represent individual tasks within a workflow.
Namespace
Methods
parameters()
Provides access to the invocable ActionInterface|Closure parameters for this job.The parameters interface for this job’s action
return()
Provides access to the return type parameter for this job.The return parameter type for this job
action()
Provides access to the job’s action.The action instance, action class name, or closure to execute
arguments()
Provides access to the job’s arguments.Associative array of argument names to values
dependencies()
Provides access to the job’s dependencies.Vector of job names that this job depends on
isSync()
Determines if the job is synchronous (blocking).True if the job is synchronous, false if async
runIf()
Provides access to the run-if conditions.Vector of conditions that must evaluate to true for the job to run
runIfNot()
Provides access to the run-if-not conditions.Vector of conditions that must evaluate to false for the job to run
caller()
Provides access to the caller who created this job.The caller interface instance
retryPolicy()
Provides access to the job retry policy.The retry policy for this job
withArguments()
Returns an instance with the specified arguments.One or more arguments to set for the job
New instance with the specified arguments
withRunIf()
Returns an instance with the specified run-if condition.One or more conditions that must evaluate to true for the job to run
New instance with the specified run-if condition
withRunIfNot()
Returns an instance with the specified run-if-not condition.One or more conditions that must evaluate to false for the job to run
New instance with the specified run-if-not condition
withIsSync()
Returns an instance with the specified sync flag.True for sync, false for async
New instance with the specified sync flag
withDepends()
Returns an instance with the specified job dependencies.One or more job names that this job depends on
New instance with the specified dependencies
withRetry()
Returns an instance with the specified retry policy.Timeout in seconds across all attempts (0 = unlimited)
Number of attempts (minimum 1)
Retry delay in seconds (0 = no delay)
New instance with the specified retry policy