X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fexecution%2FExecutionThread.java;h=b42726dd44d553d27a35bf1222a1680bd3ed0c5d;hb=0e2ff188c2e8ffac85739cccc3925e8bd82d7be9;hp=9190ea6fc1647c38d097390fff116237322de466;hpb=b811ec0603b1e596f26eee8a5378c6294cba495d;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionThread.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionThread.java index 9190ea6fc..b42726dd4 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionThread.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionThread.java @@ -19,8 +19,8 @@ package org.argeo.slc.core.execution; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.argeo.slc.execution.ExecutionFlowDescriptor; +import org.argeo.slc.execution.ExecutionStep; import org.argeo.slc.process.RealizedFlow; -import org.argeo.slc.process.SlcExecutionStep; /** Thread of a single execution */ public class ExecutionThread extends Thread { @@ -51,8 +51,8 @@ public class ExecutionThread extends Thread { .getFlowDescriptor(); String flowName = executionFlowDescriptor.getName(); - dispatchAddStep(new SlcExecutionStep(SlcExecutionStep.PHASE_START, - "Flow " + flowName)); + dispatchAddStep(new ExecutionStep(ExecutionStep.PHASE_START, "Flow " + + flowName)); try { String autoUpgrade = System @@ -60,22 +60,25 @@ public class ExecutionThread extends Thread { if (autoUpgrade != null && autoUpgrade.equals("true")) processThread.getExecutionModulesManager().upgrade( realizedFlow.getModuleNameVersion()); + + // START FLOW processThread.getExecutionModulesManager().execute(realizedFlow); + // END FLOW } catch (Exception e) { // TODO: re-throw exception ? String msg = "Execution of flow " + flowName + " failed."; log.error(msg, e); - dispatchAddStep(new SlcExecutionStep(SlcExecutionStep.ERROR, msg - + " " + e.getMessage())); + dispatchAddStep(new ExecutionStep(ExecutionStep.ERROR, msg + " " + + e.getMessage())); processThread.notifyError(); } finally { processThread.flowCompleted(); - dispatchAddStep(new SlcExecutionStep(SlcExecutionStep.PHASE_END, - "Flow " + flowName)); + dispatchAddStep(new ExecutionStep(ExecutionStep.PHASE_END, "Flow " + + flowName)); } } - private void dispatchAddStep(SlcExecutionStep step) { + private void dispatchAddStep(ExecutionStep step) { processThread.getProcessThreadGroup().dispatchAddStep(step); }