Search in sources :

Example 1 with DeadLetterJobEntityManager

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);
    }
}
Also used : DeadLetterJobEntity(org.activiti.engine.impl.persistence.entity.DeadLetterJobEntity) SuspendedJobEntity(org.activiti.engine.impl.persistence.entity.SuspendedJobEntity) JobEntity(org.activiti.engine.impl.persistence.entity.JobEntity) TimerJobEntity(org.activiti.engine.impl.persistence.entity.TimerJobEntity) TimerJobEntityManager(org.activiti.engine.impl.persistence.entity.TimerJobEntityManager) JobEntityManager(org.activiti.engine.impl.persistence.entity.JobEntityManager) DeadLetterJobEntityManager(org.activiti.engine.impl.persistence.entity.DeadLetterJobEntityManager) SuspendedJobEntityManager(org.activiti.engine.impl.persistence.entity.SuspendedJobEntityManager) DeadLetterJobEntityManager(org.activiti.engine.impl.persistence.entity.DeadLetterJobEntityManager) SuspendedJobEntity(org.activiti.engine.impl.persistence.entity.SuspendedJobEntity) SuspendedJobEntityManager(org.activiti.engine.impl.persistence.entity.SuspendedJobEntityManager) TimerJobEntity(org.activiti.engine.impl.persistence.entity.TimerJobEntity) DeadLetterJobEntity(org.activiti.engine.impl.persistence.entity.DeadLetterJobEntity)

Aggregations

DeadLetterJobEntity (org.activiti.engine.impl.persistence.entity.DeadLetterJobEntity)1 DeadLetterJobEntityManager (org.activiti.engine.impl.persistence.entity.DeadLetterJobEntityManager)1 JobEntity (org.activiti.engine.impl.persistence.entity.JobEntity)1 JobEntityManager (org.activiti.engine.impl.persistence.entity.JobEntityManager)1 SuspendedJobEntity (org.activiti.engine.impl.persistence.entity.SuspendedJobEntity)1 SuspendedJobEntityManager (org.activiti.engine.impl.persistence.entity.SuspendedJobEntityManager)1 TimerJobEntity (org.activiti.engine.impl.persistence.entity.TimerJobEntity)1 TimerJobEntityManager (org.activiti.engine.impl.persistence.entity.TimerJobEntityManager)1