package org.argeo.slc.client.ui.editors;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.argeo.slc.client.ui.controllers.ProcessController;
import org.argeo.slc.execution.ExecutionModulesManager;
import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.execution.ExecutionProcessNotifier;
-import org.argeo.slc.execution.ExecutionStep;
import org.argeo.slc.jcr.SlcJcrUtils;
import org.argeo.slc.jcr.SlcNames;
import org.argeo.slc.jcr.SlcTypes;
import org.eclipse.ui.forms.editor.FormEditor;
/** Editor for an execution process. */
-public class ProcessEditor extends FormEditor implements
- ExecutionProcessNotifier, SlcTypes, SlcNames {
+public class ProcessEditor extends FormEditor implements SlcTypes, SlcNames {
public final static String ID = ClientUiPlugin.ID + ".processEditor";
private Session session;
Map<String, String> properties = new HashMap<String, String>();
properties.put(ExecutionModulesManager.SLC_PROCESS_ID,
process.getUuid());
- modulesManager.registerProcessNotifier(this, properties);
+ // modulesManager.registerProcessNotifier(this, properties);
} catch (Exception e) {
ErrorFeedback.show("Execution of " + processNode + " failed", e);
}
return false;
}
- public void updateStatus(ExecutionProcess process, String oldStatus,
- String newStatus) {
- }
-
- public void addSteps(ExecutionProcess process, List<ExecutionStep> steps) {
- }
+ // public void updateStatus(ExecutionProcess process, String oldStatus,
+ // String newStatus) {
+ // }
+ //
+ // public void addSteps(ExecutionProcess process, List<ExecutionStep> steps)
+ // {
+ // }
/** Expects one session per editor. */
public void setSession(Session session) {
<groupId>org.argeo.tp</groupId>
<artifactId>org.apache.commons.exec</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.argeo.tp</groupId>
+ <artifactId>org.apache.commons.cli</artifactId>
+ </dependency>
<dependency>
<groupId>org.argeo.tp</groupId>
*/
package org.argeo.slc.core.execution;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.argeo.slc.execution.ExecutionFlow;
import org.argeo.slc.execution.ExecutionFlowDescriptorConverter;
import org.argeo.slc.execution.ExecutionModulesManager;
-import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.execution.ExecutionProcessNotifier;
-import org.argeo.slc.execution.ExecutionStep;
import org.argeo.slc.execution.RealizedFlow;
/** Provides the base feature of an execution module manager. */
private final static Log log = LogFactory
.getLog(AbstractExecutionModulesManager.class);
- private List<FilteredNotifier> filteredNotifiers = Collections
- .synchronizedList(new ArrayList<FilteredNotifier>());
+// private List<FilteredNotifier> filteredNotifiers = Collections
+// .synchronizedList(new ArrayList<FilteredNotifier>());
protected abstract ExecutionFlow findExecutionFlow(String moduleName,
String moduleVersion, String flowName);
//
}
- public void dispatchUpdateStatus(ExecutionProcess process,
- String oldStatus, String newStatus) {
- // filtered notifiers
- for (Iterator<FilteredNotifier> it = filteredNotifiers.iterator(); it
- .hasNext();) {
- FilteredNotifier filteredNotifier = it.next();
- if (filteredNotifier.receiveFrom(process))
- filteredNotifier.getNotifier().updateStatus(process, oldStatus,
- newStatus);
- }
-
- }
-
- public void dispatchAddSteps(ExecutionProcess process,
- List<ExecutionStep> steps) {
- process.addSteps(steps);
- for (Iterator<FilteredNotifier> it = filteredNotifiers.iterator(); it
- .hasNext();) {
- FilteredNotifier filteredNotifier = it.next();
- if (filteredNotifier.receiveFrom(process))
- filteredNotifier.getNotifier().addSteps(process, steps);
- }
- }
-
- public void registerProcessNotifier(ExecutionProcessNotifier notifier,
- Map<String, String> properties) {
- filteredNotifiers.add(new FilteredNotifier(notifier, properties));
- }
-
- public void unregisterProcessNotifier(ExecutionProcessNotifier notifier,
- Map<String, String> properties) {
- filteredNotifiers.remove(notifier);
- }
-
- protected class FilteredNotifier {
- private final ExecutionProcessNotifier notifier;
- private final String processId;
-
- public FilteredNotifier(ExecutionProcessNotifier notifier,
- Map<String, String> properties) {
- super();
- this.notifier = notifier;
- if (properties == null)
- properties = new HashMap<String, String>();
- if (properties.containsKey(SLC_PROCESS_ID))
- processId = properties.get(SLC_PROCESS_ID);
- else
- processId = null;
- }
-
- /**
- * Whether event from this process should be received by this listener.
- */
- public Boolean receiveFrom(ExecutionProcess process) {
- if (processId != null)
- if (process.getUuid().equals(processId))
- return true;
- else
- return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- return notifier.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof FilteredNotifier) {
- FilteredNotifier fn = (FilteredNotifier) obj;
- return notifier.equals(fn.notifier);
- } else if (obj instanceof ExecutionProcessNotifier) {
- ExecutionProcessNotifier epn = (ExecutionProcessNotifier) obj;
- return notifier.equals(epn);
- } else
- return false;
- }
-
- public ExecutionProcessNotifier getNotifier() {
- return notifier;
- }
-
- }
+// public void dispatchUpdateStatus(ExecutionProcess process,
+// String oldStatus, String newStatus) {
+// // filtered notifiers
+// for (Iterator<FilteredNotifier> it = filteredNotifiers.iterator(); it
+// .hasNext();) {
+// FilteredNotifier filteredNotifier = it.next();
+// if (filteredNotifier.receiveFrom(process))
+// filteredNotifier.getNotifier().updateStatus(process, oldStatus,
+// newStatus);
+// }
+//
+// }
+
+// public void dispatchAddSteps(ExecutionProcess process,
+// List<ExecutionStep> steps) {
+// process.addSteps(steps);
+// for (Iterator<FilteredNotifier> it = filteredNotifiers.iterator(); it
+// .hasNext();) {
+// FilteredNotifier filteredNotifier = it.next();
+// if (filteredNotifier.receiveFrom(process))
+// filteredNotifier.getNotifier().addSteps(process, steps);
+// }
+// }
+
+// public void registerProcessNotifier(ExecutionProcessNotifier notifier,
+// Map<String, String> properties) {
+// filteredNotifiers.add(new FilteredNotifier(notifier, properties));
+// }
+//
+// public void unregisterProcessNotifier(ExecutionProcessNotifier notifier,
+// Map<String, String> properties) {
+// filteredNotifiers.remove(notifier);
+// }
+
+// protected class FilteredNotifier {
+// private final ExecutionProcessNotifier notifier;
+// private final String processId;
+//
+// public FilteredNotifier(ExecutionProcessNotifier notifier,
+// Map<String, String> properties) {
+// super();
+// this.notifier = notifier;
+// if (properties == null)
+// properties = new HashMap<String, String>();
+// if (properties.containsKey(SLC_PROCESS_ID))
+// processId = properties.get(SLC_PROCESS_ID);
+// else
+// processId = null;
+// }
+//
+// /**
+// * Whether event from this process should be received by this listener.
+// */
+// public Boolean receiveFrom(ExecutionProcess process) {
+// if (processId != null)
+// if (process.getUuid().equals(processId))
+// return true;
+// else
+// return false;
+// return true;
+// }
+//
+// @Override
+// public int hashCode() {
+// return notifier.hashCode();
+// }
+//
+// @Override
+// public boolean equals(Object obj) {
+// if (obj instanceof FilteredNotifier) {
+// FilteredNotifier fn = (FilteredNotifier) obj;
+// return notifier.equals(fn.notifier);
+// } else if (obj instanceof ExecutionProcessNotifier) {
+// ExecutionProcessNotifier epn = (ExecutionProcessNotifier) obj;
+// return notifier.equals(epn);
+// } else
+// return false;
+// }
+//
+// public ExecutionProcessNotifier getNotifier() {
+// return notifier;
+// }
+//
+// }
}
import java.net.UnknownHostException;
import java.util.Collections;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.argeo.slc.execution.ExecutionModuleDescriptor;
import org.argeo.slc.execution.ExecutionModulesManager;
import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.execution.ExecutionProcessNotifier;
-import org.argeo.slc.execution.ExecutionStep;
import org.argeo.slc.execution.SlcAgent;
import org.argeo.slc.execution.SlcAgentDescriptor;
/** Implements the base methods of an SLC agent. */
-public class DefaultAgent implements SlcAgent, ExecutionProcessNotifier {
+public class DefaultAgent implements SlcAgent {
private final static Log log = LogFactory.getLog(DefaultAgent.class);
private SlcAgentDescriptor agentDescriptor;
}
processesThreadGroup = new ThreadGroup("SLC Processes of Agent #"
+ agentDescriptor.getUuid());
- modulesManager.registerProcessNotifier(this,
- new HashMap<String, String>());
+ // modulesManager.registerProcessNotifier(this,
+ // new HashMap<String, String>());
// final String module = System
// .getProperty(ExecutionModulesManager.UNIQUE_LAUNCH_MODULE_PROPERTY);
/** Clean up (needs to be called by overriding method) */
public void destroy() {
- modulesManager.unregisterProcessNotifier(this,
- new HashMap<String, String>());
+// modulesManager.unregisterProcessNotifier(this,
+// new HashMap<String, String>());
}
/**
modulesManager, process);
processThread.start();
runningProcesses.put(process.getUuid(), processThread);
- // FIXME find a way to remove them from this register
+
+ // clean up old processes
+ Iterator<ProcessThread> it = runningProcesses.values().iterator();
+ while (it.hasNext()) {
+ ProcessThread pThread = it.next();
+ if (!pThread.isAlive())
+ it.remove();
+ }
}
public void kill(ExecutionProcess process) {
/*
* PROCESS NOTIFIER
*/
- public void updateStatus(ExecutionProcess process, String oldStatus,
- String newStatus) {
- if (newStatus.equals(ExecutionProcess.COMPLETED)
- || newStatus.equals(ExecutionProcess.ERROR)
- || newStatus.equals(ExecutionProcess.KILLED)) {
- runningProcesses.remove(process.getUuid());
- }
- }
-
- public void addSteps(ExecutionProcess process, List<ExecutionStep> steps) {
- }
+ // public void updateStatus(ExecutionProcess process, String oldStatus,
+ // String newStatus) {
+ // if (newStatus.equals(ExecutionProcess.COMPLETED)
+ // || newStatus.equals(ExecutionProcess.ERROR)
+ // || newStatus.equals(ExecutionProcess.KILLED)) {
+ // runningProcesses.remove(process.getUuid());
+ // }
+ // }
+ //
+ // public void addSteps(ExecutionProcess process, List<ExecutionStep> steps)
+ // {
+ // }
/*
* BEAN
import org.argeo.slc.execution.ExecutionStep;
import org.argeo.slc.execution.RealizedFlow;
+/** Canonical implementation of an {@link ExecutionProcess} as a bean. */
public class DefaultProcess implements ExecutionProcess {
private String uuid = UUID.randomUUID().toString();
- private String status;
+ private String status = ExecutionProcess.NEW;
private List<ExecutionStep> steps = new ArrayList<ExecutionStep>();
+ private List<RealizedFlow> realizedFlows = new ArrayList<RealizedFlow>();
public String getUuid() {
return uuid;
}
public List<RealizedFlow> getRealizedFlows() {
- return null;
+ return realizedFlows;
}
public List<ExecutionStep> getSteps() {
this.uuid = uuid;
}
+ public void setRealizedFlows(List<RealizedFlow> realizedFlows) {
+ this.realizedFlows = realizedFlows;
+ }
+
}
import org.apache.commons.logging.LogFactory;
import org.argeo.slc.SlcException;
import org.argeo.slc.execution.ExecutionFlowDescriptor;
+import org.argeo.slc.execution.ExecutionModulesManager;
import org.argeo.slc.execution.ExecutionStep;
import org.argeo.slc.execution.RealizedFlow;
import org.springframework.security.Authentication;
private final static Log log = LogFactory.getLog(ExecutionThread.class);
+ private ExecutionModulesManager executionModulesManager;
private final RealizedFlow realizedFlow;
- private final ProcessThread processThread;
+ // private final ProcessThread processThread;
private List<Runnable> destructionCallbacks = new ArrayList<Runnable>();
- public ExecutionThread(ProcessThread processThread,
+ public ExecutionThread(ProcessThreadGroup processThreadGroup,
+ ExecutionModulesManager executionModulesManager,
RealizedFlow realizedFlow) {
- super(processThread.getProcessThreadGroup(), "Flow "
+ super(processThreadGroup, "Flow "
+ realizedFlow.getFlowDescriptor().getName());
this.realizedFlow = realizedFlow;
- this.processThread = processThread;
+ this.executionModulesManager = executionModulesManager;
+ // this.processThread = processThread;
}
public void run() {
.getFlowDescriptor();
String flowName = executionFlowDescriptor.getName();
- dispatchAddStep(new ExecutionStep(realizedFlow.getModuleName(),
- ExecutionStep.PHASE_START, "Flow " + flowName));
+ getProcessThreadGroup().dispatchAddStep(
+ new ExecutionStep(realizedFlow.getModuleName(),
+ ExecutionStep.PHASE_START, "Flow " + flowName));
try {
String autoUpgrade = System
.getProperty(SYSPROP_EXECUTION_AUTO_UPGRADE);
if (autoUpgrade != null && autoUpgrade.equals("true"))
- processThread.getExecutionModulesManager().upgrade(
- realizedFlow.getModuleNameVersion());
+ executionModulesManager.upgrade(realizedFlow
+ .getModuleNameVersion());
// START FLOW
- processThread.getExecutionModulesManager().execute(realizedFlow);
+ executionModulesManager.execute(realizedFlow);
// END FLOW
} catch (Exception e) {
// TODO: re-throw exception ?
String msg = "Execution of flow " + flowName + " failed.";
log.error(msg, e);
- dispatchAddStep(new ExecutionStep(realizedFlow.getModuleName(),
- ExecutionStep.ERROR, msg + " " + e.getMessage()));
- processThread.notifyError();
+ getProcessThreadGroup().dispatchAddStep(
+ new ExecutionStep(realizedFlow.getModuleName(),
+ ExecutionStep.ERROR, msg + " " + e.getMessage()));
+ // processThread.notifyError();
} finally {
- processThread.flowCompleted();
- dispatchAddStep(new ExecutionStep(realizedFlow.getModuleName(),
- ExecutionStep.PHASE_END, "Flow " + flowName));
+ // processThread.flowCompleted();
+ getProcessThreadGroup().dispatchAddStep(
+ new ExecutionStep(realizedFlow.getModuleName(),
+ ExecutionStep.PHASE_END, "Flow " + flowName));
processDestructionCallbacks();
}
}
- private void dispatchAddStep(ExecutionStep step) {
- processThread.getProcessThreadGroup().dispatchAddStep(step);
- }
+ // private void dispatchAddStep(ExecutionStep step) {
+ // getProcessThreadGroup().dispatchAddStep(step);
+ // }
private synchronized void processDestructionCallbacks() {
for (int i = destructionCallbacks.size() - 1; i >= 0; i--) {
}
protected ProcessThreadGroup getProcessThreadGroup() {
- return processThread.getProcessThreadGroup();
+ return (ProcessThreadGroup) getThreadGroup();
+ // return processThread.getProcessThreadGroup();
}
- public RealizedFlow getRealizedFlow() {
- return realizedFlow;
- }
+ // public RealizedFlow getRealizedFlow() {
+ // return realizedFlow;
+ // }
}
import org.springframework.security.Authentication;
import org.springframework.security.context.SecurityContextHolder;
+/**
+ * Main thread coordinating an {@link ExecutionProcess}, launching parallel or
+ * sequential {@link ExecutionThread}s.
+ */
public class ProcessThread extends Thread {
private final static Log log = LogFactory.getLog(ProcessThread.class);
private Set<ExecutionThread> executionThreads = Collections
.synchronizedSet(new HashSet<ExecutionThread>());
- private Boolean hadAnError = false;
+ // private Boolean hadAnError = false;
private Boolean killed = false;
public ProcessThread(ThreadGroup processesThreadGroup,
super(processesThreadGroup, "SLC Process #" + process.getUuid());
this.executionModulesManager = executionModulesManager;
this.process = process;
- processThreadGroup = new ProcessThreadGroup(executionModulesManager,
- this);
+ processThreadGroup = new ProcessThreadGroup(process);
}
public final void run() {
// Start logging
new LoggingThread().start();
- String oldStatus = process.getStatus();
+ // String oldStatus = process.getStatus();
process.setStatus(ExecutionProcess.RUNNING);
- executionModulesManager.dispatchUpdateStatus(process, oldStatus,
- ExecutionProcess.RUNNING);
+ // executionModulesManager.dispatchUpdateStatus(process, oldStatus,
+ // ExecutionProcess.RUNNING);
try {
process();
/** Make sure this is called BEFORE all the threads are interrupted. */
private void computeFinalStatus() {
- String oldStatus = process.getStatus();
+ // String oldStatus = process.getStatus();
// TODO: error management at flow level?
if (killed)
process.setStatus(ExecutionProcess.KILLED);
- else if (hadAnError)
+ else if (processThreadGroup.hadAnError())
process.setStatus(ExecutionProcess.ERROR);
else
process.setStatus(ExecutionProcess.COMPLETED);
- executionModulesManager.dispatchUpdateStatus(process, oldStatus,
- process.getStatus());
+ // executionModulesManager.dispatchUpdateStatus(process, oldStatus,
+ // process.getStatus());
log.info("\n## SLC Process #" + process.getUuid() + " "
+ process.getStatus() + "\n");
}
if (killed)
return;
- ExecutionThread thread = new ExecutionThread(this, realizedFlow);
+ ExecutionThread thread = new ExecutionThread(processThreadGroup,
+ executionModulesManager, realizedFlow);
executionThreads.add(thread);
thread.start();
return;
}
- public void notifyError() {
- hadAnError = true;
- }
-
- public synchronized void flowCompleted() {
- // notifyAll();
- }
+// public void notifyError() {
+// hadAnError = true;
+// }
+//
+// public synchronized void flowCompleted() {
+// // notifyAll();
+// }
public ExecutionProcess getProcess() {
return process;
*/
package org.argeo.slc.core.execution;
-import java.util.ArrayList;
-import java.util.List;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
-import org.argeo.slc.execution.ExecutionModulesManager;
import org.argeo.slc.execution.ExecutionProcess;
import org.argeo.slc.execution.ExecutionStep;
import org.springframework.security.Authentication;
/** The thread group attached to a given {@link SlcExecution}. */
public class ProcessThreadGroup extends ThreadGroup {
- private final ExecutionModulesManager executionModulesManager;
- private final ProcessThread processThread;
+ // private final ExecutionModulesManager executionModulesManager;
+ // private final ProcessThread processThread;
private final Authentication authentication;
private final static Integer STEPS_BUFFER_CAPACITY = 5000;
private BlockingQueue<ExecutionStep> steps = new ArrayBlockingQueue<ExecutionStep>(
STEPS_BUFFER_CAPACITY);
- public ProcessThreadGroup(ExecutionModulesManager executionModulesManager,
- ProcessThread processThread) {
- super("SLC Process #" + processThread.getProcess().getUuid()
- + " thread group");
- this.executionModulesManager = executionModulesManager;
- this.processThread = processThread;
+ private Boolean hadAnError = false;
+
+ public ProcessThreadGroup(ExecutionProcess executionProcess) {
+ super("SLC Process #" + executionProcess.getUuid() + " thread group");
+ // this.executionModulesManager = executionModulesManager;
+ // this.processThread = processThread;
this.authentication = SecurityContextHolder.getContext()
.getAuthentication();
}
}
public void dispatchAddStep(ExecutionStep step) {
- ExecutionProcess slcProcess = processThread.getProcess();
- List<ExecutionStep> steps = new ArrayList<ExecutionStep>();
- steps.add(step);
+ // ExecutionProcess slcProcess = processThread.getProcess();
+ // List<ExecutionStep> steps = new ArrayList<ExecutionStep>();
+ // steps.add(step);
// TODO clarify why we don't dispatch steps, must be a reason
// dispatchAddSteps(steps);
- slcProcess.addSteps(steps);
+ // slcProcess.addSteps(steps);
+ if (step.getType().equals(ExecutionStep.ERROR))
+ hadAnError = true;
this.steps.add(step);
}
- public void dispatchAddSteps(List<ExecutionStep> steps) {
- ExecutionProcess slcProcess = processThread.getProcess();
- executionModulesManager.dispatchAddSteps(slcProcess, steps);
- }
+ // public void dispatchAddSteps(List<ExecutionStep> steps) {
+ // ExecutionProcess slcProcess = processThread.getProcess();
+ // executionModulesManager.dispatchAddSteps(slcProcess, steps);
+ // }
public BlockingQueue<ExecutionStep> getSteps() {
return steps;
}
+ public Boolean hadAnError() {
+ return hadAnError;
+ }
}
package org.argeo.slc.execution;
import java.util.List;
-import java.util.Map;
import org.argeo.slc.deploy.ModulesManager;
/** Synchronously finds and executes an {@link ExecutionFlow}. */
public void execute(RealizedFlow realizedFlow);
- /** Notify of a status update status of the {@link ExecutionProcess} */
- public void dispatchUpdateStatus(ExecutionProcess process,
- String oldStatus, String newStatus);
-
- /** Notify that a step was added in an {@link ExecutionProcess} */
- public void dispatchAddSteps(ExecutionProcess process,
- List<ExecutionStep> steps);
-
- /**
- * Register a notifier which will be notified based on the provided
- * properties.
- */
- public void registerProcessNotifier(ExecutionProcessNotifier notifier,
- Map<String, String> properties);
-
- /** Unregisters a notifier */
- public void unregisterProcessNotifier(ExecutionProcessNotifier notifier,
- Map<String, String> properties);
+ // /** Notify of a status update status of the {@link ExecutionProcess} */
+// public void dispatchUpdateStatus(ExecutionProcess process,
+// String oldStatus, String newStatus);
+ //
+ // /** Notify that a step was added in an {@link ExecutionProcess} */
+ // public void dispatchAddSteps(ExecutionProcess process,
+ // List<ExecutionStep> steps);
+ //
+ // /**
+ // * Register a notifier which will be notified based on the provided
+ // * properties.
+ // */
+ // public void registerProcessNotifier(ExecutionProcessNotifier notifier,
+ // Map<String, String> properties);
+ //
+ // /** Unregisters a notifier */
+ // public void unregisterProcessNotifier(ExecutionProcessNotifier notifier,
+ // Map<String, String> properties);
}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.execution;
-
-import java.util.List;
-
-/**
- * Implementations of this interface can be notified of events related to
- * process execution.
- */
-public interface ExecutionProcessNotifier {
- /**
- * Notify a status change, see {@link ExecutionProcess} for the list of
- * vaailable statuses.
- */
- public void updateStatus(ExecutionProcess process, String oldStatus,
- String newStatus);
-
- /** Notifiy of new execution steps. */
- public void addSteps(ExecutionProcess process, List<ExecutionStep> steps);
-
-}
import java.util.List;
-
-/** A local agent, able to run SLC Execution locally. */
+/**
+ * A local agent can run SLC processes. It is responsible for creating their
+ * threads and integrating them with various UIs. It typically wraps
+ * {@link ExecutionModulesManager} which is used to run flows synchronously at a
+ * lower level.
+ */
public interface SlcAgent {
/** Agent unique identifier */
public String getAgentUuid();
/** Kills this process */
public void kill(ExecutionProcess process);
+ /**
+ * Describe all the flows provided by this execution module. Typically
+ * called in order to build a realized flow.
+ */
public ExecutionModuleDescriptor getExecutionModuleDescriptor(
String moduleName, String version);
+ /** List all execution modules which can be processed by this agent. */
public List<ExecutionModuleDescriptor> listExecutionModuleDescriptors();
/** @return true if still alive. */
}
}
String executionName = ci.nextArgument();
+
launch(slcCommand, firstArg, executionName);
return "COMMAND COMPLETED";