use of org.activiti.engine.impl.persistence.entity.DeadLetterJobEntity in project Activiti by Activiti.
the class DefaultJobManager method moveDeadLetterJobToExecutableJob.
@Override
public JobEntity moveDeadLetterJobToExecutableJob(DeadLetterJobEntity deadLetterJobEntity, int retries) {
if (deadLetterJobEntity == null) {
throw new ActivitiIllegalArgumentException("Null job provided");
}
JobEntity executableJob = createExecutableJobFromOtherJob(deadLetterJobEntity);
executableJob.setRetries(retries);
boolean insertSuccesful = processEngineConfiguration.getJobEntityManager().insertJobEntity(executableJob);
if (insertSuccesful) {
processEngineConfiguration.getDeadLetterJobEntityManager().delete(deadLetterJobEntity);
triggerExecutorIfNeeded(executableJob);
return executableJob;
}
return null;
}
Aggregations