]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionProcess.java
Disable trace logging
[gpl/argeo-slc.git] / org.argeo.slc.api / src / org / argeo / slc / execution / ExecutionProcess.java
1 /*
2 * Copyright (C) 2007-2012 Argeo GmbH
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.argeo.slc.execution;
17
18 import java.util.List;
19
20 /**
21 * A process is the functional representation of a combination of executions.
22 * While an execution is the actual java code running, a process exists before,
23 * during and after the execution actually took place, providing an entry point
24 * for the definition of executions, their monitoring (e.g. logging) and
25 * tracking. A process can be distributed or parallelized. <br/>
26 * NEW => INITIALIZED => SCHEDULED => RUNNING<br/>
27 * RUNNING => {COMPLETED | ERROR | KILLED}<br/>
28 * {COMPLETED | ERROR | KILLED} => PURGED<br/>
29 * UNKOWN : this is a bug if this status occurs<br/>
30 */
31 public interface ExecutionProcess {
32 /** The process is not yet usable. */
33 public final static String NEW = "NEW";
34 /** The process is usable but not yet scheduled to run. */
35 public final static String INITIALIZED = "INITIALIZED";
36 /** The process is usable and scheduled to run, but not yet running. */
37 public final static String SCHEDULED = "SCHEDULED";
38 /** The process is currently running. */
39 public final static String RUNNING = "RUNNING";
40 /** The process has properly completed. */
41 public final static String COMPLETED = "COMPLETED";
42 /** The process failed because of an unexpected error. */
43 public final static String ERROR = "ERROR";
44 /** The process was killed explicitly or through a crash. */
45 public final static String KILLED = "KILLED";
46 /** The status cannot be retrieved (probably because of unexpected errors). */
47 public final static String UNKOWN = "UNKOWN";
48
49 /**
50 * Only a reference to the process has been kept, all monitoring data such
51 * as logs have been purged.
52 */
53 public final static String PURGED = "PURGED";
54
55 /** The UUID of this process. */
56 public String getUuid();
57
58 /** The current status of this process. */
59 public String getStatus();
60
61 /** Sets the current status of this process */
62 public void setStatus(String status);
63
64 public void addSteps(List<ExecutionStep> steps);
65
66 public List<RealizedFlow> getRealizedFlows();
67 }