- log.info("##\n## Process SLC Execution " + slcExecution+"\n##");
-
- for(RealizedFlow flow : slcExecution.getRealizedFlows()) {
- ExecutionModule module = getExecutionModule(flow.getModuleName(),
- flow.getModuleVersion());
- if(module != null) {
- ExecutionThread thread = new ExecutionThread(flow.getFlowDescriptor(), module);
- thread.start();
+ new ProcessThread(slcExecution).start();
+ }
+
+ protected void dispatchUpdateStatus(SlcExecution slcExecution,
+ String oldStatus, String newStatus) {
+ for (Iterator<SlcExecutionNotifier> it = slcExecutionNotifiers
+ .iterator(); it.hasNext();) {
+ it.next().updateStatus(slcExecution, oldStatus, newStatus);
+ }
+ }
+
+ public void setSlcExecutionNotifiers(
+ List<SlcExecutionNotifier> slcExecutionNotifiers) {
+ this.slcExecutionNotifiers = slcExecutionNotifiers;
+ }
+
+ private class ProcessThread extends Thread {
+ private final SlcExecution slcExecution;
+ private final List<RealizedFlow> flowsToProcess = new ArrayList<RealizedFlow>();
+
+ public ProcessThread(SlcExecution slcExecution) {
+ this.slcExecution = slcExecution;
+ }
+
+ public void run() {
+ log.info("\n##\n## Process SLC Execution " + slcExecution
+ + "\n##\n");
+
+ // FIXME: hack to let the SlcExecution be registered on server
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e1) {
+ // silent