import org.argeo.slc.jcr.SlcJcrUtils;
import org.argeo.slc.jcr.SlcNames;
import org.argeo.slc.jcr.execution.JcrExecutionProcess;
-import org.argeo.slc.process.SlcExecution;
import org.argeo.slc.runtime.SlcAgent;
import org.argeo.slc.runtime.SlcAgentFactory;
-import org.argeo.slc.services.SlcExecutionService;
/**
* We use a separate class (not in UI components) so that it can be a singleton
*/
public class ProcessController {
private final static Log log = LogFactory.getLog(ProcessController.class);
- private SlcExecutionService slcExecutionService;
private Map<String, SlcAgentFactory> agentFactories = new HashMap<String, SlcAgentFactory>();
- public void execute(SlcAgent agent, SlcExecution slcExecution) {
- slcExecutionService.newExecution(slcExecution);
- agent.process(slcExecution);
- if (log.isDebugEnabled())
- log.debug("SlcExecution " + slcExecution.getUuid()
- + " launched on Agent " + agent.toString());
- }
-
public void process(Node processNode) {
JcrExecutionProcess process = new JcrExecutionProcess(processNode);
try {
}
}
- public void setSlcExecutionService(SlcExecutionService slcExecutionService) {
- this.slcExecutionService = slcExecutionService;
- }
-
public synchronized void register(SlcAgentFactory agentFactory,
Map<String, String> properties) {
String path = properties.get(SlcJcrConstants.PROPERTY_PATH);