- slcProcess.setStatus(SlcExecution.STATUS_FINISHED);
- dispatchUpdateStatus(slcProcess, SlcExecution.STATUS_RUNNING,
- slcProcess.getStatus());
+ process.setStatus(SlcExecution.COMPLETED);
+ executionModulesManager.dispatchUpdateStatus(process,
+ SlcExecution.RUNNING, process.getStatus());
+
+ log.info("\n## SLC Process #" + process.getUuid() + " COMPLETED\n");
+ }
+
+ /**
+ * Implementation specific execution. To be overridden in order to deal with
+ * custom process types. Default expects an {@link SlcExecution}.
+ */
+ protected void process() {
+ if (!(process instanceof SlcExecution))
+ throw new SlcException("Unsupported process type "
+ + process.getClass());
+ SlcExecution slcExecution = (SlcExecution) process;
+ List<RealizedFlow> flowsToProcess = new ArrayList<RealizedFlow>();
+ flowsToProcess.addAll(slcExecution.getRealizedFlows());
+
+ while (flowsToProcess.size() > 0) {
+ RealizedFlow realizedFlow = flowsToProcess.remove(0);
+ execute(realizedFlow, true);
+ }