public interface JobManager
| Modifier and Type | Method and Description |
|---|---|
AbstractRuntimeJobEntity |
activateSuspendedJob(SuspendedJobEntity job)
Transforms a
SuspendedJobEntity back to an AbstractRuntimeJobEntity (i.e. |
AbstractRuntimeJobEntity |
copyJobInfo(AbstractRuntimeJobEntity copyToJob,
AbstractRuntimeJobEntity copyFromJob)
Copy job info from one job to the other
|
void |
createAsyncJob(JobEntity jobEntity,
boolean exclusive)
Creates an async job so that it can be continued later in a background thread.
|
DeadLetterJobEntity |
createDeadLetterJobFromOtherJob(AbstractRuntimeJobEntity otherJob)
Create a dead letter job from another job
|
JobEntity |
createExecutableJobFromOtherJob(AbstractRuntimeJobEntity job)
Create an executable job from another job
|
SuspendedJobEntity |
createSuspendedJobFromOtherJob(AbstractRuntimeJobEntity otherJob)
Create a suspended job from another job
|
TimerJobEntity |
createTimerJobFromOtherJob(AbstractRuntimeJobEntity otherJob)
Create a timer job from another job
|
void |
execute(JobInfo job)
Execute a job, which means that the logic (async logic, timer that fires, etc) is executed, typically by a background thread of an executor.
|
String |
getBusinessCalendarName(JobEntity timerEntity,
org.flowable.variable.api.delegate.VariableScope variableScope)
Get the business calendar name of the job configuration
|
JobEntity |
moveDeadLetterJobToExecutableJob(DeadLetterJobEntity deadLetterJobEntity,
int retries)
Transforms a
DeadLetterJobEntity to a JobEntity, thus making it executable again. |
DeadLetterJobEntity |
moveJobToDeadLetterJob(AbstractRuntimeJobEntity job)
Transforms an
AbstractRuntimeJobEntity to a DeadLetterJobEntity. |
SuspendedJobEntity |
moveJobToSuspendedJob(AbstractRuntimeJobEntity job)
Moves an
AbstractRuntimeJobEntity to become a SuspendedJobEntity, such that the AsyncExecutor won't pick it up anymore for execution. |
TimerJobEntity |
moveJobToTimerJob(AbstractRuntimeJobEntity job)
Moves an
AbstractRuntimeJobEntity to become a TimerJobEntity. |
JobEntity |
moveTimerJobToExecutableJob(TimerJobEntity timerJob)
Moves a
TimerJobEntity to become an async JobEntity. |
void |
scheduleAsyncJob(JobEntity job)
Schedules and async job.
|
HistoryJobEntity |
scheduleHistoryJob(HistoryJobEntity historyJobEntity)
schedules a
HistoryJobEntity, meaning it will be scheduled (inserted in the database/put on a queue/...) to be executed at a later point in time. |
void |
scheduleTimerJob(TimerJobEntity timerJob)
Schedules a timer, meaning it will be inserted in the datastore.
|
void |
setJobServiceConfiguration(JobServiceConfiguration jobServiceConfiguration)
The ProcessEngineConfiguration instance will be passed when the ProcessEngine is built.
|
void |
unacquire(JobInfo job)
Unacquires a job, meaning that this job was previously locked, and it is now freed to be acquired by other executor nodes.
|
void |
unacquireWithDecrementRetries(JobInfo job)
Unacquires a job, meaning that this job was previously locked, and it is now freed to be acquired by other executor nodes.
|
void execute(JobInfo job)
void unacquire(JobInfo job)
void unacquireWithDecrementRetries(JobInfo job)
void createAsyncJob(JobEntity jobEntity, boolean exclusive)
void scheduleAsyncJob(JobEntity job)
AsyncExecutor is running, it can be executed immediately after the transaction. Otherwise it can be picked up by other executors.void scheduleTimerJob(TimerJobEntity timerJob)
String getBusinessCalendarName(JobEntity timerEntity, org.flowable.variable.api.delegate.VariableScope variableScope)
JobEntity moveTimerJobToExecutableJob(TimerJobEntity timerJob)
TimerJobEntity to become an async JobEntity.
This happens for example when the due date of a timer is reached, the timer entity then becomes a 'regular' async job that can be picked up by the AsyncExecutor.TimerJobEntity moveJobToTimerJob(AbstractRuntimeJobEntity job)
AbstractRuntimeJobEntity to become a TimerJobEntity.
This happens for example when an async job is executed and fails. It then becomes a timer, as it needs to be retried later.SuspendedJobEntity moveJobToSuspendedJob(AbstractRuntimeJobEntity job)
AbstractRuntimeJobEntity to become a SuspendedJobEntity, such that the AsyncExecutor won't pick it up anymore for execution.AbstractRuntimeJobEntity activateSuspendedJob(SuspendedJobEntity job)
SuspendedJobEntity back to an AbstractRuntimeJobEntity (i.e. to what it was originally). The job will now again be able to picked up by the AsyncExecutor.DeadLetterJobEntity moveJobToDeadLetterJob(AbstractRuntimeJobEntity job)
AbstractRuntimeJobEntity to a DeadLetterJobEntity. This means that the job has been tried a configurable amount of times, but kept failing.JobEntity moveDeadLetterJobToExecutableJob(DeadLetterJobEntity deadLetterJobEntity, int retries)
DeadLetterJobEntity to a JobEntity, thus making it executable again. Note that a 'retries' parameter needs to be passed, as the job got into the deadletter table
because of it failed and retries became 0.HistoryJobEntity scheduleHistoryJob(HistoryJobEntity historyJobEntity)
HistoryJobEntity, meaning it will be scheduled (inserted in the database/put on a queue/...) to be executed at a later point in time.void setJobServiceConfiguration(JobServiceConfiguration jobServiceConfiguration)
JobEntity createExecutableJobFromOtherJob(AbstractRuntimeJobEntity job)
TimerJobEntity createTimerJobFromOtherJob(AbstractRuntimeJobEntity otherJob)
SuspendedJobEntity createSuspendedJobFromOtherJob(AbstractRuntimeJobEntity otherJob)
DeadLetterJobEntity createDeadLetterJobFromOtherJob(AbstractRuntimeJobEntity otherJob)
AbstractRuntimeJobEntity copyJobInfo(AbstractRuntimeJobEntity copyToJob, AbstractRuntimeJobEntity copyFromJob)
Copyright © 2018 Flowable. All rights reserved.