]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionThread.java
Save current state even if not completely stable
[gpl/argeo-slc.git] / runtime / org.argeo.slc.core / src / main / java / org / argeo / slc / core / execution / ExecutionThread.java
index 5e288f264f0de75447afbbbfbeecff7fa82c7392..7493de4e7bd5178474304110ede04cc84c86ac6a 100644 (file)
@@ -51,8 +51,8 @@ public class ExecutionThread extends Thread {
                                .getFlowDescriptor();
                String flowName = executionFlowDescriptor.getName();
 
-               dispatchAddStep(new ExecutionStep(ExecutionStep.PHASE_START, "Flow "
-                               + flowName));
+               dispatchAddStep(new ExecutionStep(realizedFlow.getModuleName(),
+                               ExecutionStep.PHASE_START, "Flow " + flowName));
 
                try {
                        String autoUpgrade = System
@@ -68,13 +68,13 @@ public class ExecutionThread extends Thread {
                        // TODO: re-throw exception ?
                        String msg = "Execution of flow " + flowName + " failed.";
                        log.error(msg, e);
-                       dispatchAddStep(new ExecutionStep(ExecutionStep.ERROR, msg + " "
-                                       + e.getMessage()));
+                       dispatchAddStep(new ExecutionStep(realizedFlow.getModuleName(),
+                                       ExecutionStep.ERROR, msg + " " + e.getMessage()));
                        processThread.notifyError();
                } finally {
                        processThread.flowCompleted();
-                       dispatchAddStep(new ExecutionStep(ExecutionStep.PHASE_END, "Flow "
-                                       + flowName));
+                       dispatchAddStep(new ExecutionStep(realizedFlow.getModuleName(),
+                                       ExecutionStep.PHASE_END, "Flow " + flowName));
                }
        }
 
@@ -82,4 +82,8 @@ public class ExecutionThread extends Thread {
                processThread.getProcessThreadGroup().dispatchAddStep(step);
        }
 
+       public RealizedFlow getRealizedFlow() {
+               return realizedFlow;
+       }
+
 }