X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.api.slc%2Fsrc%2Forg%2Fargeo%2Fapi%2Fslc%2Fexecution%2FExecutionProcess.java;fp=org.argeo.api.slc%2Fsrc%2Forg%2Fargeo%2Fapi%2Fslc%2Fexecution%2FExecutionProcess.java;h=68f8d221efed72ac1a9d2b3fa7c2ce95d71ceb16;hb=09c9e5093fe1353aaac344ac8a8caf2e1dcc0778;hp=0000000000000000000000000000000000000000;hpb=8ff996a3380166be2ae9cf0ef0fa22c58e11746a;p=gpl%2Fargeo-slc.git
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionProcess.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionProcess.java
new file mode 100644
index 000000000..68f8d221e
--- /dev/null
+++ b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionProcess.java
@@ -0,0 +1,52 @@
+package org.argeo.api.slc.execution;
+
+import java.util.List;
+
+/**
+ * A process is the functional representation of a combination of executions.
+ * While an execution is the actual java code running, a process exists before,
+ * during and after the execution actually took place, providing an entry point
+ * for the definition of executions, their monitoring (e.g. logging) and
+ * tracking. A process can be distributed or parallelized.
+ * NEW => INITIALIZED => SCHEDULED => RUNNING
+ * RUNNING => {COMPLETED | ERROR | KILLED}
+ * {COMPLETED | ERROR | KILLED} => PURGED
+ * UNKOWN : this is a bug if this status occurs
+ */
+public interface ExecutionProcess {
+ /** The process is not yet usable. */
+ public final static String NEW = "NEW";
+ /** The process is usable but not yet scheduled to run. */
+ public final static String INITIALIZED = "INITIALIZED";
+ /** The process is usable and scheduled to run, but not yet running. */
+ public final static String SCHEDULED = "SCHEDULED";
+ /** The process is currently running. */
+ public final static String RUNNING = "RUNNING";
+ /** The process has properly completed. */
+ public final static String COMPLETED = "COMPLETED";
+ /** The process failed because of an unexpected error. */
+ public final static String ERROR = "ERROR";
+ /** The process was killed explicitly or through a crash. */
+ public final static String KILLED = "KILLED";
+ /** The status cannot be retrieved (probably because of unexpected errors). */
+ public final static String UNKOWN = "UNKOWN";
+
+ /**
+ * Only a reference to the process has been kept, all monitoring data such
+ * as logs have been purged.
+ */
+ public final static String PURGED = "PURGED";
+
+ /** The UUID of this process. */
+ public String getUuid();
+
+ /** The current status of this process. */
+ public String getStatus();
+
+ /** Sets the current status of this process */
+ public void setStatus(String status);
+
+ public void addSteps(List steps);
+
+ public List getRealizedFlows();
+}