airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1517900 - in /airavata/trunk/samples/airavata-client: create-application/src/main/java/org/apache/airavata/api/samples/CreateApplication.java workflow-run/src/main/java/org/apache/airavata/client/samples/RunWorkflow.java
Date Tue, 27 Aug 2013 18:06:53 GMT
Author: chathuri
Date: Tue Aug 27 18:06:53 2013
New Revision: 1517900

URL: http://svn.apache.org/r1517900
Log:
fixing issue with airavata client samples

Modified:
    airavata/trunk/samples/airavata-client/create-application/src/main/java/org/apache/airavata/api/samples/CreateApplication.java
    airavata/trunk/samples/airavata-client/workflow-run/src/main/java/org/apache/airavata/client/samples/RunWorkflow.java

Modified: airavata/trunk/samples/airavata-client/create-application/src/main/java/org/apache/airavata/api/samples/CreateApplication.java
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/airavata-client/create-application/src/main/java/org/apache/airavata/api/samples/CreateApplication.java?rev=1517900&r1=1517899&r2=1517900&view=diff
==============================================================================
--- airavata/trunk/samples/airavata-client/create-application/src/main/java/org/apache/airavata/api/samples/CreateApplication.java
(original)
+++ airavata/trunk/samples/airavata-client/create-application/src/main/java/org/apache/airavata/api/samples/CreateApplication.java
Tue Aug 27 18:06:53 2013
@@ -61,13 +61,13 @@ public class CreateApplication {
         // creating airavata client object //
         port = Integer.parseInt("8080");
         serverUrl = "localhost";
-        serverContextName = "airavata-registry";
+        serverContextName = "airavata/services";
 
         log.info("Configurations - port : " + port);
         log.info("Configurations - serverUrl : " + serverUrl);
         log.info("Configurations - serverContext : " + serverContextName);
 
-        registryURL = "http://" + serverUrl + ":" + port + "/" + serverContextName + "/api";
+        registryURL = "http://" + serverUrl + ":" + port + "/" + serverContextName + "/registry";
 
         log.info("Configurations - Registry URL : " + registryURL);
 

Modified: airavata/trunk/samples/airavata-client/workflow-run/src/main/java/org/apache/airavata/client/samples/RunWorkflow.java
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/airavata-client/workflow-run/src/main/java/org/apache/airavata/client/samples/RunWorkflow.java?rev=1517900&r1=1517899&r2=1517900&view=diff
==============================================================================
--- airavata/trunk/samples/airavata-client/workflow-run/src/main/java/org/apache/airavata/client/samples/RunWorkflow.java
(original)
+++ airavata/trunk/samples/airavata-client/workflow-run/src/main/java/org/apache/airavata/client/samples/RunWorkflow.java
Tue Aug 27 18:06:53 2013
@@ -67,25 +67,28 @@ public class RunWorkflow {
         // creating airavata client object //
         port = Integer.parseInt("8080");
         serverUrl = "localhost";
-        serverContextName = "airavata-registry";
+        serverContextName = "airavata/services";
         System.out.println((new File(".")).getAbsolutePath());
         log.info("Configurations - port : " + port);
         log.info("Configurations - serverUrl : " + serverUrl);
         log.info("Configurations - serverContext : " + serverContextName);
 
-        registryURL = "http://" + serverUrl + ":" + port + "/" + serverContextName + "/api";
+        registryURL = "http://" + serverUrl + ":" + port + "/" + serverContextName + "/registry";
 
         log.info("Configurations - Registry URL : " + registryURL);
 
         PasswordCallback passwordCallback = new PasswordCallbackImpl(getUserName(), getPassword());
         airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(),
getUserName(),
                 passwordCallback);
+        airavataAPI.setCurrentUser(getUserName());
 
         String workflowName = "EchoSample";
         // Saving workflow method, workflow file has the workflow Name set to EchoSample,
so when we use saveWorkflow
         // method it will
         // save the workflow with that name.
-        airavataAPI.getWorkflowManager().addWorkflow(getWorkflowComposeContent());
+        if (!airavataAPI.getWorkflowManager().isWorkflowExists(workflowName)){
+            airavataAPI.getWorkflowManager().addWorkflow(getWorkflowComposeContent());
+        }
 
         // Now workflow has saved, Now we have to set inputs
         List<WorkflowInput> workflowInputs = new ArrayList<WorkflowInput>();



Mime
View raw message