coord.setEnd(SchemaHelper.formatDateUTC(processCluster.getValidity().getEnd()));
coord.setTimezone(process.getTimezone().getID());
coord.setFrequency("${coord:" + process.getFrequency().toString() + "}");
// controls
CONTROLS controls = new CONTROLS();
controls.setConcurrency(String.valueOf(process.getParallel()));
controls.setExecution(process.getOrder().name());
Frequency timeout = process.getTimeout();
long frequency_ms = ExpressionHelper.get().
evaluate(process.getFrequency().toString(), Long.class);
long timeout_ms;
if (timeout != null) {
timeout_ms = ExpressionHelper.get().
evaluate(process.getTimeout().toString(), Long.class);
} else {
timeout_ms = frequency_ms * 6;
if (timeout_ms < THIRTY_MINUTES) timeout_ms = THIRTY_MINUTES;
}
controls.setTimeout(String.valueOf(timeout_ms / (1000 * 60)));
if (timeout_ms / frequency_ms * 2 > 0) {
controls.setThrottle(String.valueOf(timeout_ms / frequency_ms * 2));
}
coord.setControls(controls);
// Configuration
Map<String, String> props = createCoordDefaultConfiguration(cluster, coordPath, coordName);