use of org.activiti.engine.impl.persistence.entity.DeadLetterJobEntityManager in project Activiti by Activiti.
the class DestroyScopeOperation method deleteAllScopeJobs.
private void deleteAllScopeJobs(ExecutionEntity scopeExecution, TimerJobEntityManager timerJobEntityManager) {
Collection<TimerJobEntity> timerJobsForExecution = timerJobEntityManager.findJobsByExecutionId(scopeExecution.getId());
for (TimerJobEntity job : timerJobsForExecution) {
timerJobEntityManager.delete(job);
}
JobEntityManager jobEntityManager = commandContext.getJobEntityManager();
Collection<JobEntity> jobsForExecution = jobEntityManager.findJobsByExecutionId(scopeExecution.getId());
for (JobEntity job : jobsForExecution) {
jobEntityManager.delete(job);
}
SuspendedJobEntityManager suspendedJobEntityManager = commandContext.getSuspendedJobEntityManager();
Collection<SuspendedJobEntity> suspendedJobsForExecution = suspendedJobEntityManager.findJobsByExecutionId(scopeExecution.getId());
for (SuspendedJobEntity job : suspendedJobsForExecution) {
suspendedJobEntityManager.delete(job);
}
DeadLetterJobEntityManager deadLetterJobEntityManager = commandContext.getDeadLetterJobEntityManager();
Collection<DeadLetterJobEntity> deadLetterJobsForExecution = deadLetterJobEntityManager.findJobsByExecutionId(scopeExecution.getId());
for (DeadLetterJobEntity job : deadLetterJobsForExecution) {
deadLetterJobEntityManager.delete(job);
}
}
Aggregations