Expression remainingExpression = ExpressionFactory.create(remainingCondition.getRootElement());
Expression initialExpression = ExpressionFactory.create(initialCondition.getRootElement());
Processor jobProcessor = ProcessorManager.getInstance().getProcessor(jobUri);
ProcessorManager.prepareValues(jobProcessor.getParameterDescriptors(), jobParameters, context);
String processorId = context.getProcessId();
Job job;
if ( processorId == null ) {
job = new Job(context.getStep(), jobUri, initialExpression, remainingExpression, jobParameters, repeatJob, persistentJob);
} else {
job = new Job(context.getProcessId()+":"+context.getStep(), jobUri, initialExpression, remainingExpression, jobParameters, repeatJob, persistentJob);
}
Scheduler.getInstance().registerJob(job);
Scheduler.getInstance().saveJobs();
return Result.OK;
}