use of org.apache.airavata.workflow.engine.interpretor.WorkflowInterpreterConfiguration in project airavata by apache.
the class WorkflowEngineImpl method launchExperiment.
@Override
public void launchExperiment(String experimentId, String token) throws WorkflowEngineException {
try {
ExperimentCatalog experimentCatalog = RegistryFactory.getDefaultExpCatalog();
Experiment experiment = (Experiment) experimentCatalog.get(ExperimentCatalogModelType.EXPERIMENT, experimentId);
WorkflowCatalog workflowCatalog = WorkflowCatalogFactory.getWorkflowCatalog();
WorkflowInterpreterConfiguration config = new WorkflowInterpreterConfiguration(new Workflow(workflowCatalog.getWorkflow(experiment.getApplicationId()).getGraph()));
final WorkflowInterpreter workflowInterpreter = new WorkflowInterpreter(experiment, token, config, getOrchestratorClient(), rabbitMQPublisher);
new Thread() {
public void run() {
try {
workflowInterpreter.scheduleDynamically();
} catch (WorkflowException e) {
logger.error(e.getMessage(), e);
} catch (RegistryException e) {
logger.error(e.getMessage(), e);
} catch (AiravataException e) {
logger.error(e.getMessage(), e);
}
}
}.start();
} catch (Exception e) {
logger.error("Error while retrieving the experiment", e);
WorkflowEngineException exception = new WorkflowEngineException("Error while launching the workflow experiment. More info : " + e.getMessage());
throw exception;
}
}
Aggregations