PersistenceService persistenceService = services.getPersistenceService();
if (messageService != null
&& persistenceService != null
&& persistenceService.getJobSession().countDeletableJobsForProcessInstance(this) > 0)
{
CleanUpProcessJob job = new CleanUpProcessJob(rootToken);
job.setDueDate(new Date());
messageService.send(job);
}
}
}
}