Fixed AIRAVATA-1590
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/41ea9467 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/41ea9467 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/41ea9467 Branch: refs/heads/master Commit: 41ea9467865dc60cecb2304a97ba9acd85ba2aac Parents: 6bfb956 Author: shamrath <[email protected]> Authored: Tue Feb 24 09:56:42 2015 -0500 Committer: shamrath <[email protected]> Committed: Tue Feb 24 09:56:42 2015 -0500 ---------------------------------------------------------------------- .../airavata-orchestrator-service/pom.xml | 5 ++++ .../server/OrchestratorServerHandler.java | 26 +++++++++++--------- 2 files changed, 20 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/41ea9467/modules/orchestrator/airavata-orchestrator-service/pom.xml ---------------------------------------------------------------------- diff --git a/modules/orchestrator/airavata-orchestrator-service/pom.xml b/modules/orchestrator/airavata-orchestrator-service/pom.xml index 72ecc0e..3817852 100644 --- a/modules/orchestrator/airavata-orchestrator-service/pom.xml +++ b/modules/orchestrator/airavata-orchestrator-service/pom.xml @@ -52,6 +52,11 @@ </dependency> <dependency> <groupId>org.apache.airavata</groupId> + <artifactId>simple-workflow</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.airavata</groupId> <artifactId>app-catalog-data</artifactId> <version>${project.version}</version> </dependency> http://git-wip-us.apache.org/repos/asf/airavata/blob/41ea9467/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java ---------------------------------------------------------------------- diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java index e88945d..c93e213 100644 --- a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java +++ b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java @@ -34,7 +34,6 @@ import org.apache.airavata.common.utils.AiravataUtils; import org.apache.airavata.common.utils.AiravataZKUtils; import org.apache.airavata.common.utils.Constants; import org.apache.airavata.common.utils.ServerSettings; -import org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential; import org.apache.airavata.credential.store.store.CredentialReader; import org.apache.airavata.gfac.core.scheduler.HostScheduler; import org.apache.airavata.gfac.core.utils.GFacUtils; @@ -51,10 +50,8 @@ import org.apache.airavata.model.util.ExecutionType; import org.apache.airavata.model.workspace.experiment.*; import org.apache.airavata.orchestrator.core.exception.OrchestratorException; import org.apache.airavata.orchestrator.cpi.OrchestratorService; -import org.apache.airavata.orchestrator.cpi.OrchestratorService.Client; import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl; import org.apache.airavata.orchestrator.cpi.orchestrator_cpi_serviceConstants; -import org.apache.airavata.orchestrator.util.OrchestratorRecoveryHandler; import org.apache.airavata.orchestrator.util.OrchestratorServerThreadPoolExecutor; import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory; import org.apache.airavata.registry.cpi.Registry; @@ -62,10 +59,8 @@ import org.apache.airavata.registry.cpi.RegistryException; import org.apache.airavata.registry.cpi.RegistryModelType; import org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.TaskDetailConstants; import org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.WorkflowNodeConstants; -import org.apache.airavata.workflow.engine.WorkflowEngine; -import org.apache.airavata.workflow.engine.WorkflowEngineException; -import org.apache.airavata.workflow.engine.WorkflowEngineFactory; import org.apache.airavata.orchestrator.util.DataModelUtils; +import org.apache.airavata.simple.workflow.engine.SimpleWorkflowInterpreter; import org.apache.thrift.TException; import org.apache.zookeeper.*; import org.apache.zookeeper.data.Stat; @@ -632,11 +627,20 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface, return true; } private void launchWorkflowExperiment(String experimentId, String airavataCredStoreToken) throws TException { - try { - WorkflowEngine workflowEngine = WorkflowEngineFactory.getWorkflowEngine(); - workflowEngine.launchExperiment(experimentId, airavataCredStoreToken); - } catch (WorkflowEngineException e) { - log.errorId(experimentId, "Error while launching experiment.", e); +// try { +// WorkflowEngine workflowEngine = WorkflowEngineFactory.getWorkflowEngine(); +// workflowEngine.launchExperiment(experimentId, airavataCredStoreToken); +// } catch (WorkflowEngineException e) { +// log.errorId(experimentId, "Error while launching experiment.", e); +// } + + try { + SimpleWorkflowInterpreter simpleWorkflowInterpreter = new SimpleWorkflowInterpreter(experimentId, airavataCredStoreToken); + Thread thread = new Thread(simpleWorkflowInterpreter); + thread.start(); +// simpleWorkflowInterpreter.run(); + } catch (RegistryException e) { + log.error("Error while launching workflow", e); } }
