});
public Result process(Map parameters, Context context) throws Exception {
Map jobParameters = ((MapValue)parameters.get(PARAMETERS)).getMap();
URI jobUri = (URIValue)parameters.get(PROCESSOR);
XMLValue initialCondition = (XMLValue)parameters.get(CONDITION);
boolean repeatJob = ((BooleanValue)parameters.get(REPEAT)).booleanValue();
Value remainingConditionValue = (Value)parameters.get(REMAINING_CONDITION);
XMLValue remainingCondition = null;
if ( remainingConditionValue == NullValue.NULL ) {
remainingCondition = initialCondition;
} else {
remainingCondition = (XMLValue)remainingConditionValue;
}
boolean persistentJob = ((BooleanValue)parameters.get(PERSISTENT)).booleanValue();
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;