use of org.apache.ode.bpel.dd.TCleanup in project carbon-business-process by wso2.
the class ProcessConfigurationImpl method getCronJobs.
public List<CronJob> getCronJobs() {
List<CronJob> jobs = new ArrayList<CronJob>();
for (TSchedule schedule : processInfo.getScheduleList()) {
CronJob job = new CronJob();
try {
job.setCronExpression(new CronExpression(schedule.getWhen()));
for (final TCleanup aCleanup : schedule.getCleanupList()) {
CleanupInfo cleanupInfo = new CleanupInfo();
assert !aCleanup.getFilterList().isEmpty();
cleanupInfo.setFilters(aCleanup.getFilterList());
ProcessCleanupConfImpl.processACleanup(cleanupInfo.getCategories(), aCleanup.getCategoryList());
Scheduler.JobDetails runnableDetails = new Scheduler.JobDetails();
runnableDetails.getDetailsExt().put(BPELConstants.ODE_DETAILS_EXT_CLEAN_UP_INFO, cleanupInfo);
runnableDetails.setProcessId(processId);
runnableDetails.getDetailsExt().put(BPELConstants.ODE_DETAILS_EXT_TRANSACTION_SIZE, 10);
job.getRunnableDetailList().add(runnableDetails);
}
jobs.add(job);
} catch (ParseException pe) {
log.error("Exception during parsing the schedule cron expression: " + schedule.getWhen() + ", skipped the scheduled job.", pe);
}
}
return jobs;
}
Aggregations