public class TimerJobEntityManagerImpl extends AbstractJobServiceEngineEntityManager<TimerJobEntity,TimerJobDataManager> implements TimerJobEntityManager
serviceConfigurationdataManager| Constructor and Description |
|---|
TimerJobEntityManagerImpl(JobServiceConfiguration jobServiceConfiguration,
TimerJobDataManager jobDataManager) |
| Modifier and Type | Method and Description |
|---|---|
protected Date |
calculateNextTimer(JobEntity timerEntity,
org.flowable.variable.api.delegate.VariableScope variableScope) |
protected int |
calculateRepeatValue(JobEntity timerEntity) |
TimerJobEntity |
createAndCalculateNextTimer(JobEntity timerEntity,
org.flowable.variable.api.delegate.VariableScope variableScope)
Creates a new
TimerJobEntity, typically when a timer is used in a repeating way. |
protected TimerJobEntity |
createTimer(JobEntity te) |
void |
delete(TimerJobEntity jobEntity) |
protected boolean |
doInsert(TimerJobEntity jobEntity,
boolean fireCreateEvent) |
long |
findJobCountByQueryCriteria(TimerJobQueryImpl jobQuery)
Same as
TimerJobEntityManager.findJobsByQueryCriteria(TimerJobQueryImpl), but only returns a count and not the instances itself. |
List<TimerJobEntity> |
findJobsByExecutionId(String id)
Returns all
TimerJobEntity instances related to on ExecutionEntity. |
List<TimerJobEntity> |
findJobsByProcessInstanceId(String id)
Returns all
TimerJobEntity instances related to on ExecutionEntity. |
List<Job> |
findJobsByQueryCriteria(TimerJobQueryImpl jobQuery)
Executes a
JobQueryImpl and returns the matching TimerJobEntity instances. |
List<TimerJobEntity> |
findJobsByScopeIdAndSubScopeId(String scopeId,
String subScopeId)
Returns all
TimerJobEntity for the given scope and subscope. |
List<TimerJobEntity> |
findJobsByTypeAndProcessDefinitionId(String jobHandlerType,
String processDefinitionId)
Returns the
TimerJobEntity for a given process definition. |
List<TimerJobEntity> |
findJobsByTypeAndProcessDefinitionKeyAndTenantId(String jobHandlerType,
String processDefinitionKey,
String tenantId)
The same as
TimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String), but by key and for a specific tenantId. |
List<TimerJobEntity> |
findJobsByTypeAndProcessDefinitionKeyNoTenantId(String jobHandlerType,
String processDefinitionKey)
The same as
TimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String), but by key and specifically for the 'no tenant' mode. |
List<TimerJobEntity> |
findTimerJobsToExecute(Page page)
Returns the
TimerJobEntity instances that are eligible to execute, meaning the due date of the timer has been passed. |
void |
insert(TimerJobEntity jobEntity) |
void |
insert(TimerJobEntity jobEntity,
boolean fireCreateEvent) |
boolean |
insertTimerJobEntity(TimerJobEntity timerJobEntity)
Insert the
TimerJobEntity, similar to #insert(TimerJobEntity), but returns a boolean in case the insert did not go through. |
protected boolean |
isValidTime(JobEntity timerEntity,
Date newTimerDate,
org.flowable.variable.api.delegate.VariableScope variableScope) |
protected void |
setNewRepeat(JobEntity timerEntity,
int newRepeatValue) |
void |
updateJobTenantIdForDeployment(String deploymentId,
String newTenantId)
Changes the tenantId for all jobs related to a given
DeploymentEntity. |
createEntityEvent, deleteByteArrayRefgetClock, getEventDispatcher, getServiceConfigurationcreate, delete, delete, findById, fireEntityDeletedEvent, fireEntityInsertedEvent, fireEntityUpdatedEvent, getDataManager, setDataManager, update, updatepublic TimerJobEntityManagerImpl(JobServiceConfiguration jobServiceConfiguration, TimerJobDataManager jobDataManager)
public TimerJobEntity createAndCalculateNextTimer(JobEntity timerEntity, org.flowable.variable.api.delegate.VariableScope variableScope)
TimerJobEntityManagerTimerJobEntity, typically when a timer is used in a repeating way. The returns TimerJobEntity is not yet inserted.
Returns null if the timer has finished its repetitions.
createAndCalculateNextTimer in interface TimerJobEntityManagerpublic List<TimerJobEntity> findTimerJobsToExecute(Page page)
TimerJobEntityManagerTimerJobEntity instances that are eligible to execute, meaning the due date of the timer has been passed.findTimerJobsToExecute in interface TimerJobEntityManagerpublic List<TimerJobEntity> findJobsByTypeAndProcessDefinitionId(String jobHandlerType, String processDefinitionId)
TimerJobEntityManagerTimerJobEntity for a given process definition.
This is for example used when deleting a process definition: it finds the TimerJobEntity representing the timer start events.
findJobsByTypeAndProcessDefinitionId in interface TimerJobEntityManagerpublic List<TimerJobEntity> findJobsByTypeAndProcessDefinitionKeyNoTenantId(String jobHandlerType, String processDefinitionKey)
TimerJobEntityManagerTimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String), but by key and specifically for the 'no tenant' mode.findJobsByTypeAndProcessDefinitionKeyNoTenantId in interface TimerJobEntityManagerpublic List<TimerJobEntity> findJobsByTypeAndProcessDefinitionKeyAndTenantId(String jobHandlerType, String processDefinitionKey, String tenantId)
TimerJobEntityManagerTimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String), but by key and for a specific tenantId.findJobsByTypeAndProcessDefinitionKeyAndTenantId in interface TimerJobEntityManagerpublic List<TimerJobEntity> findJobsByExecutionId(String id)
TimerJobEntityManagerTimerJobEntity instances related to on ExecutionEntity.findJobsByExecutionId in interface TimerJobEntityManagerpublic List<TimerJobEntity> findJobsByProcessInstanceId(String id)
TimerJobEntityManagerTimerJobEntity instances related to on ExecutionEntity.findJobsByProcessInstanceId in interface TimerJobEntityManagerpublic List<TimerJobEntity> findJobsByScopeIdAndSubScopeId(String scopeId, String subScopeId)
TimerJobEntityManagerTimerJobEntity for the given scope and subscope.findJobsByScopeIdAndSubScopeId in interface TimerJobEntityManagerpublic List<Job> findJobsByQueryCriteria(TimerJobQueryImpl jobQuery)
TimerJobEntityManagerJobQueryImpl and returns the matching TimerJobEntity instances.findJobsByQueryCriteria in interface TimerJobEntityManagerpublic long findJobCountByQueryCriteria(TimerJobQueryImpl jobQuery)
TimerJobEntityManagerTimerJobEntityManager.findJobsByQueryCriteria(TimerJobQueryImpl), but only returns a count and not the instances itself.findJobCountByQueryCriteria in interface TimerJobEntityManagerpublic void updateJobTenantIdForDeployment(String deploymentId, String newTenantId)
TimerJobEntityManagerDeploymentEntity.updateJobTenantIdForDeployment in interface TimerJobEntityManagerpublic boolean insertTimerJobEntity(TimerJobEntity timerJobEntity)
TimerJobEntityManagerTimerJobEntity, similar to #insert(TimerJobEntity), but returns a boolean in case the insert did not go through. This could happen if the execution related to the
TimerJobEntity has been removed (for example due to a task complete for a timer boundary on that task).insertTimerJobEntity in interface TimerJobEntityManagerpublic void insert(TimerJobEntity jobEntity)
insert in interface EntityManager<TimerJobEntity>insert in class AbstractEntityManager<TimerJobEntity,TimerJobDataManager>public void insert(TimerJobEntity jobEntity, boolean fireCreateEvent)
insert in interface EntityManager<TimerJobEntity>insert in class AbstractEntityManager<TimerJobEntity,TimerJobDataManager>protected boolean doInsert(TimerJobEntity jobEntity, boolean fireCreateEvent)
public void delete(TimerJobEntity jobEntity)
delete in interface EntityManager<TimerJobEntity>delete in class AbstractEntityManager<TimerJobEntity,TimerJobDataManager>protected TimerJobEntity createTimer(JobEntity te)
protected void setNewRepeat(JobEntity timerEntity, int newRepeatValue)
protected boolean isValidTime(JobEntity timerEntity, Date newTimerDate, org.flowable.variable.api.delegate.VariableScope variableScope)
protected Date calculateNextTimer(JobEntity timerEntity, org.flowable.variable.api.delegate.VariableScope variableScope)
protected int calculateRepeatValue(JobEntity timerEntity)
Copyright © 2020 Flowable. All rights reserved.